fixed warning "implicit conversion to bool" on MSVC