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 . --- xfa/src/fxbarcode/datamatrix/BC_DataMatrixDataBlock.cpp | 2 +- xfa/src/fxbarcode/oned/BC_OneDReader.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/src/fxbarcode') diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDataBlock.cpp b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDataBlock.cpp index 6ccb2f75d9..fbd0ea1c9e 100644 --- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDataBlock.cpp +++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDataBlock.cpp @@ -76,7 +76,7 @@ CFX_PtrArray* CBC_DataMatrixDataBlock::GetDataBlocks( } } } - FX_BOOL specialVersion = version->GetVersionNumber() == 24; + const bool specialVersion = version->GetVersionNumber() == 24; int32_t numLongerBlocks = specialVersion ? 8 : numResultBlocks; for (j = 0; j < numLongerBlocks; j++) { if (rawCodewordsOffset < rawCodewords->GetSize()) { diff --git a/xfa/src/fxbarcode/oned/BC_OneDReader.cpp b/xfa/src/fxbarcode/oned/BC_OneDReader.cpp index 7cb8ba51fa..76d05042da 100644 --- a/xfa/src/fxbarcode/oned/BC_OneDReader.cpp +++ b/xfa/src/fxbarcode/oned/BC_OneDReader.cpp @@ -61,7 +61,7 @@ CFX_ByteString CBC_OneDReader::DeDecode(CBC_BinaryBitmap* image, } for (int32_t x = 0; x < maxLines; x++) { int32_t rowStepsAboveOrBelow = (x + 1) >> 1; - FX_BOOL isAbove = (x & 0x01) == 0; + const bool isAbove = (x & 0x01) == 0; int32_t rowNumber = middle + rowStep * (isAbove ? rowStepsAboveOrBelow : -rowStepsAboveOrBelow); -- cgit v1.2.3