From 12f3e4a58f05850b93af35619cb04f0231d86acc Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 2 Nov 2016 15:17:29 -0700 Subject: Remove FX_BOOL from core Review-Url: https://codereview.chromium.org/2477443002 --- core/fpdfapi/render/cpdf_type3cache.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'core/fpdfapi/render/cpdf_type3cache.cpp') diff --git a/core/fpdfapi/render/cpdf_type3cache.cpp b/core/fpdfapi/render/cpdf_type3cache.cpp index 7fe552108d..ba92142dbf 100644 --- a/core/fpdfapi/render/cpdf_type3cache.cpp +++ b/core/fpdfapi/render/cpdf_type3cache.cpp @@ -34,24 +34,24 @@ void CPDF_UniqueKeyGen::Generate(int count, ...) { m_KeyLen = count * sizeof(uint32_t); } -FX_BOOL IsScanLine1bpp(uint8_t* pBuf, int width) { +bool IsScanLine1bpp(uint8_t* pBuf, int width) { int size = width / 8; for (int i = 0; i < size; i++) { if (pBuf[i]) - return TRUE; + return true; } return (width % 8) && (pBuf[width / 8] & (0xff << (8 - width % 8))); } -FX_BOOL IsScanLine8bpp(uint8_t* pBuf, int width) { +bool IsScanLine8bpp(uint8_t* pBuf, int width) { for (int i = 0; i < width; i++) { if (pBuf[i] > 0x40) - return TRUE; + return true; } - return FALSE; + return false; } -int DetectFirstLastScan(const CFX_DIBitmap* pBitmap, FX_BOOL bFirst) { +int DetectFirstLastScan(const CFX_DIBitmap* pBitmap, bool bFirst) { int height = pBitmap->GetHeight(); int pitch = pBitmap->GetPitch(); int width = pBitmap->GetWidth(); @@ -131,12 +131,12 @@ CFX_GlyphBitmap* CPDF_Type3Cache::RenderGlyph(CPDF_Type3Glyphs* pSize, int top = 0; if (FXSYS_fabs(image_matrix.b) < FXSYS_fabs(image_matrix.a) / 100 && FXSYS_fabs(image_matrix.c) < FXSYS_fabs(image_matrix.d) / 100) { - int top_line = DetectFirstLastScan(pBitmap, TRUE); - int bottom_line = DetectFirstLastScan(pBitmap, FALSE); + int top_line = DetectFirstLastScan(pBitmap, true); + int bottom_line = DetectFirstLastScan(pBitmap, false); if (top_line == 0 && bottom_line == pBitmap->GetHeight() - 1) { FX_FLOAT top_y = image_matrix.d + image_matrix.f; FX_FLOAT bottom_y = image_matrix.f; - FX_BOOL bFlipped = top_y > bottom_y; + bool bFlipped = top_y > bottom_y; if (bFlipped) { FX_FLOAT temp = top_y; top_y = bottom_y; -- cgit v1.2.3