From 007e6c0f9559412788b903bcb6a7601e220c3be8 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 26 Feb 2016 14:31:56 -0800 Subject: 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 . --- core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp') 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; -- cgit v1.2.3