From 065e9321b84fc0490f3da9099e8840c65e06868d Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 23 Jul 2015 11:34:44 -0700 Subject: Fix FX_BOOL type mismatches. Extracted from https://codereview.chromium.org/1252613002/ R=thestig@chromium.org Review URL: https://codereview.chromium.org/1253603002 . --- core/src/fxge/ge/fx_ge_fontmap.cpp | 14 +++++++------- core/src/fxge/ge/fx_ge_linux.cpp | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'core/src/fxge') diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp index 4674589911..14427a5e40 100644 --- a/core/src/fxge/ge/fx_ge_fontmap.cpp +++ b/core/src/fxge/ge/fx_ge_fontmap.cpp @@ -592,8 +592,8 @@ void CFX_FontMapper::AddInstalledFont(const CFX_ByteString& name, int charset) if (bLocalized) { void* hFont = m_pFontInfo->GetFont(name); if (hFont == NULL) { - FX_BOOL bExact; - hFont = m_pFontInfo->MapFont(0, 0, FXFONT_DEFAULT_CHARSET, 0, name, bExact); + int iExact; + hFont = m_pFontInfo->MapFont(0, 0, FXFONT_DEFAULT_CHARSET, 0, name, iExact); if (hFont == NULL) { return; } @@ -1045,7 +1045,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru bItalic = TRUE; } FX_BOOL bCJK = FALSE; - FX_BOOL bExact = FALSE; + int iExact = 0; int Charset = FXFONT_ANSI_CHARSET; if (WindowCP) { Charset = _GetCharsetFromCodePage(WindowCP); @@ -1126,9 +1126,9 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru bItalic = TRUE; } } - bExact = !match.IsEmpty(); - void* hFont = m_pFontInfo->MapFont(weight, bItalic, Charset, PitchFamily, family, bExact); - if (bExact) { + iExact = !match.IsEmpty(); + void* hFont = m_pFontInfo->MapFont(weight, bItalic, Charset, PitchFamily, family, iExact); + if (iExact) { pSubstFont->m_SubstFlags |= FXFONT_SUBST_EXACT; } if (hFont == NULL) { @@ -1451,7 +1451,7 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path, FXSYS_FILE* pFile, FX_ } m_FontList.SetAt(facename, pInfo); } -void* CFX_FolderFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact) +void* CFX_FolderFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, int& iExact) { return NULL; } diff --git a/core/src/fxge/ge/fx_ge_linux.cpp b/core/src/fxge/ge/fx_ge_linux.cpp index 4e7334596b..861afd259c 100644 --- a/core/src/fxge/ge/fx_ge_linux.cpp +++ b/core/src/fxge/ge/fx_ge_linux.cpp @@ -30,7 +30,7 @@ Base14Substs[] = { class CFX_LinuxFontInfo : public CFX_FolderFontInfo { public: - virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact); + void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, int& iExact) override; FX_BOOL ParseFontCfg(); void* FindFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL bMatchName); }; @@ -77,14 +77,14 @@ static int32_t GetJapanesePreference(const FX_CHAR* facearr, int weight, int pic } return 2; } -void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* cstr_face, FX_BOOL& bExact) +void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* cstr_face, int& iExact) { CFX_ByteString face = cstr_face; int iBaseFont; for (iBaseFont = 0; iBaseFont < 12; iBaseFont ++) if (face == CFX_ByteStringC(Base14Substs[iBaseFont].m_pName)) { face = Base14Substs[iBaseFont].m_pSubstName; - bExact = TRUE; + iExact = 1; break; } if (iBaseFont < 12) { -- cgit v1.2.3