c++ - don't rely on implicit int to bool conversions
This commit is contained in:
parent
eded32d27d
commit
1733db5022
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue