Fix implicit bool conversion perf warning on msvc