Make bool -> int conversion explicit to silence VC build warnings.
Merge pull request #3250 from AndrejMitrovic/FixVCWarning

Make bool -> int conversion explicit to silence VC build warnings.