fix msvc warning C4804: '/' : unsafe use of type 'bool' in operation