Michael Stefaniuc : gdi32: Avoid TRUE : FALSE conditional expressions.
Alexandre Julliard
julliard at winehq.org
Wed Feb 6 15:32:28 CST 2019
Module: wine
Branch: master
Commit: 0aea7fc915a7ba02f71763c2068336b2c7fcf4d2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0aea7fc915a7ba02f71763c2068336b2c7fcf4d2
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Mon Feb 4 23:16:42 2019 +0100
gdi32: Avoid TRUE : FALSE conditional expressions.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdi32/freetype.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index c38108e..de62425 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -8217,14 +8217,14 @@ static BOOL load_child_font(GdiFont *font, CHILD_FONT *child)
UINT penalty = 0, new_penalty = 0;
BOOL bold, italic, bd, it;
- italic = font->font_desc.lf.lfItalic ? TRUE : FALSE;
- bold = font->font_desc.lf.lfWeight > FW_MEDIUM ? TRUE : FALSE;
+ italic = !!font->font_desc.lf.lfItalic;
+ bold = font->font_desc.lf.lfWeight > FW_MEDIUM;
face_list = get_face_list_from_family( child->face->family );
LIST_FOR_EACH_ENTRY( child_face, face_list, Face, entry )
{
- it = child_face->ntmFlags & NTM_ITALIC ? TRUE : FALSE;
- bd = child_face->ntmFlags & NTM_BOLD ? TRUE : FALSE;
+ it = !!(child_face->ntmFlags & NTM_ITALIC);
+ bd = !!(child_face->ntmFlags & NTM_BOLD);
new_penalty = ( it ^ italic ) + ( bd ^ bold );
if (!best_face || new_penalty < penalty)
{
More information about the wine-cvs
mailing list