From 320b2313d19869333ed453af546e61a9fc2b81c9 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 23 Jul 2015 13:26:26 -0700 Subject: FX_BOOL considered harmful, part 2. Fully automatic change, execpt for cleanup in fx_system.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1254703002 . --- core/src/fxge/ge/fx_ge_linux.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'core/src/fxge/ge/fx_ge_linux.cpp') diff --git a/core/src/fxge/ge/fx_ge_linux.cpp b/core/src/fxge/ge/fx_ge_linux.cpp index 861afd259c..9f493a6cfc 100644 --- a/core/src/fxge/ge/fx_ge_linux.cpp +++ b/core/src/fxge/ge/fx_ge_linux.cpp @@ -30,9 +30,9 @@ Base14Substs[] = { class CFX_LinuxFontInfo : public CFX_FolderFontInfo { public: - 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); + void* MapFont(int weight, bool bItalic, int charset, int pitch_family, const FX_CHAR* family, int& iExact) override; + bool ParseFontCfg(); + void* FindFont(int weight, bool bItalic, int charset, int pitch_family, const FX_CHAR* family, bool bMatchName); }; #define LINUX_GPNAMESIZE 6 static const struct { @@ -77,7 +77,7 @@ 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, int& iExact) +void* CFX_LinuxFontInfo::MapFont(int weight, bool bItalic, int charset, int pitch_family, const FX_CHAR* cstr_face, int& iExact) { CFX_ByteString face = cstr_face; int iBaseFont; @@ -91,7 +91,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p return GetFont(face); } void* p = NULL; - FX_BOOL bCJK = TRUE; + bool bCJK = true; switch (charset) { case FXFONT_SHIFTJIS_CHARSET: { int32_t index = GetJapanesePreference(cstr_face, weight, pitch_family); @@ -129,7 +129,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p } break; default: - bCJK = FALSE; + bCJK = false; break; } if (charset == FXFONT_ANSI_CHARSET && (pitch_family & FXFONT_FF_FIXEDPITCH)) { @@ -157,7 +157,7 @@ static FX_DWORD _LinuxGetCharset(int charset) } return 0; } -static int32_t _LinuxGetSimilarValue(int weight, FX_BOOL bItalic, int pitch_family, FX_DWORD style) +static int32_t _LinuxGetSimilarValue(int weight, bool bItalic, int pitch_family, FX_DWORD style) { int32_t iSimilarValue = 0; if ((style & FXFONT_BOLD) == (weight > 400)) { @@ -177,7 +177,7 @@ static int32_t _LinuxGetSimilarValue(int weight, FX_BOOL bItalic, int pitch_fami } return iSimilarValue; } -void* CFX_LinuxFontInfo::FindFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL bMatchName) +void* CFX_LinuxFontInfo::FindFont(int weight, bool bItalic, int charset, int pitch_family, const FX_CHAR* family, bool bMatchName) { CFontFaceInfo* pFind = NULL; FX_DWORD charset_flag = _LinuxGetCharset(charset); @@ -217,9 +217,9 @@ IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault() } return pInfo; } -FX_BOOL CFX_LinuxFontInfo::ParseFontCfg() +bool CFX_LinuxFontInfo::ParseFontCfg() { - return FALSE; + return false; } void CFX_GEModule::InitPlatform() { -- cgit v1.2.3