Fix MSVC performance warning (int-bool-cast)