summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-26 14:31:56 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-26 14:31:56 -0800
commit007e6c0f9559412788b903bcb6a7601e220c3be8 (patch)
treea2c6bb85eaa2b63fd24ed70fd3c6ddad54e219d5 /core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
parent281a9eadff15b167e2ee3032e21b83190ad49125 (diff)
downloadpdfium-007e6c0f9559412788b903bcb6a7601e220c3be8.tar.xz
Remove some FX_BOOLs
Grepping for FX_BOOL and |==| on the same line gives a very strong clue that the expression won't be out of range of the |bool| type iteself. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1736323003 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp')
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 3595c99428..bcac9d87d4 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -263,10 +263,10 @@ CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTA* pLogFont,
if ((pLogFont->lfPitchAndFamily & 0xf8) == FF_SCRIPT) {
flags |= PDFFONT_SCRIPT;
}
- FX_BOOL bCJK = pLogFont->lfCharSet == CHINESEBIG5_CHARSET ||
- pLogFont->lfCharSet == GB2312_CHARSET ||
- pLogFont->lfCharSet == HANGEUL_CHARSET ||
- pLogFont->lfCharSet == SHIFTJIS_CHARSET;
+ bool bCJK = pLogFont->lfCharSet == CHINESEBIG5_CHARSET ||
+ pLogFont->lfCharSet == GB2312_CHARSET ||
+ pLogFont->lfCharSet == HANGEUL_CHARSET ||
+ pLogFont->lfCharSet == SHIFTJIS_CHARSET;
CFX_ByteString basefont;
if (bTranslateName && bCJK) {
basefont = _FPDF_GetPSNameFromTT(hDC);
@@ -828,10 +828,10 @@ CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert) {
if (!pFont) {
return NULL;
}
- FX_BOOL bCJK = charset == FXFONT_CHINESEBIG5_CHARSET ||
- charset == FXFONT_GB2312_CHARSET ||
- charset == FXFONT_HANGEUL_CHARSET ||
- charset == FXFONT_SHIFTJIS_CHARSET;
+ bool bCJK = charset == FXFONT_CHINESEBIG5_CHARSET ||
+ charset == FXFONT_GB2312_CHARSET ||
+ charset == FXFONT_HANGEUL_CHARSET ||
+ charset == FXFONT_SHIFTJIS_CHARSET;
CFX_ByteString basefont = pFont->GetFamilyName();
basefont.Replace(" ", "");
int flags = 0;