Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: fpdfsdk/src/fpdf_sysfontinfo.cpp

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fpdf_progressive.cpp ('k') | fpdfsdk/src/fpdf_transformpage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdf_sysfontinfo.cpp
diff --git a/fpdfsdk/src/fpdf_sysfontinfo.cpp b/fpdfsdk/src/fpdf_sysfontinfo.cpp
index 249055d344548608ef4c6e3972d3fa6fdb56a52b..726d9226d84172f27c54d687fa5ad2c8bafecec6 100644
--- a/fpdfsdk/src/fpdf_sysfontinfo.cpp
+++ b/fpdfsdk/src/fpdf_sysfontinfo.cpp
@@ -20,19 +20,19 @@ public:
delete this;
}
- virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override
+ virtual bool EnumFontList(CFX_FontMapper* pMapper) override
{
if (m_pInfo->EnumFonts) {
m_pInfo->EnumFonts(m_pInfo, pMapper);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact) override
+ void* MapFont(int weight, bool bItalic, int charset, int pitch_family, const FX_CHAR* family, int& iExact) override
{
if (m_pInfo->MapFont)
- return m_pInfo->MapFont(m_pInfo, weight, bItalic, charset, pitch_family, family, &bExact);
+ return m_pInfo->MapFont(m_pInfo, weight, bItalic, charset, pitch_family, family, &iExact);
return NULL;
}
@@ -50,25 +50,25 @@ public:
return 0;
}
- virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override
+ virtual bool GetFaceName(void* hFont, CFX_ByteString& name) override
{
- if (m_pInfo->GetFaceName == NULL) return FALSE;
+ if (m_pInfo->GetFaceName == NULL) return false;
FX_DWORD size = m_pInfo->GetFaceName(m_pInfo, hFont, NULL, 0);
- if (size == 0) return FALSE;
+ if (size == 0) return false;
char* buffer = FX_Alloc(char, size);
size = m_pInfo->GetFaceName(m_pInfo, hFont, buffer, size);
name = CFX_ByteString(buffer, size);
FX_Free(buffer);
- return TRUE;
+ return true;
}
- virtual FX_BOOL GetFontCharset(void* hFont, int& charset) override
+ virtual bool GetFontCharset(void* hFont, int& charset) override
{
if (m_pInfo->GetFontCharset) {
charset = m_pInfo->GetFontCharset(m_pInfo, hFont);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
virtual void DeleteFont(void* hFont) override
« no previous file with comments | « fpdfsdk/src/fpdf_progressive.cpp ('k') | fpdfsdk/src/fpdf_transformpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698