c++ - don't rely on implicit int to bool conversions

This commit is contained in:
artemp 2015-07-15 17:46:27 +02:00
parent eded32d27d
commit 1733db5022

View file

@ -36,12 +36,12 @@ font_face::font_face(FT_Face face)
bool font_face::set_character_sizes(double size) bool font_face::set_character_sizes(double size)
{ {
return !FT_Set_Char_Size(face_,0,(FT_F26Dot6)(size * (1<<6)),0,0); return (FT_Set_Char_Size(face_,0,(FT_F26Dot6)(size * (1<<6)),0,0) == 0);
} }
bool font_face::set_unscaled_character_sizes() bool font_face::set_unscaled_character_sizes()
{ {
return !FT_Set_Char_Size(face_,0,face_->units_per_EM,0,0); return (FT_Set_Char_Size(face_,0,face_->units_per_EM,0,0) == 0);
} }
bool font_face::glyph_dimensions(glyph_info & glyph) const bool font_face::glyph_dimensions(glyph_info & glyph) const