summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_edit
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
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')
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp16
2 files changed, 10 insertions, 10 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index f103786350..878dc2ab2a 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -1270,7 +1270,7 @@ int32_t CPDF_Creator::WriteOldIndirectObject(FX_DWORD objnum) {
FX_BOOL bExistInMap =
pdfium::ContainsKey(m_pDocument->m_IndirectObjs, objnum);
const uint8_t object_type = m_pParser->GetObjectType(objnum);
- FX_BOOL bObjStm = (object_type == 2) && m_pEncryptDict && !m_pXRefStream;
+ bool bObjStm = (object_type == 2) && m_pEncryptDict && !m_pXRefStream;
if (m_pParser->IsVersionUpdated() || m_bSecurityChanged || bExistInMap ||
bObjStm) {
CPDF_Object* pObj = m_pDocument->GetIndirectObject(objnum);
@@ -1547,7 +1547,7 @@ int32_t CPDF_Creator::WriteDoc_Stage1(IFX_Pause* pPause) {
m_pParser->GetLastXRefOffset() == 0) {
InitOldObjNumOffsets();
FX_DWORD dwEnd = m_pParser->GetLastObjNum();
- FX_BOOL bObjStm = (m_dwFlags & FPDFCREATE_OBJECTSTREAM) != 0;
+ bool bObjStm = (m_dwFlags & FPDFCREATE_OBJECTSTREAM) != 0;
for (FX_DWORD objnum = 0; objnum <= dwEnd; objnum++) {
if (m_pParser->IsObjectFreeOrNull(objnum))
continue;
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;