Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1715)

Unified Diff: core/src/fxge/dib/fx_dib_composite.cpp

Issue 1405723003: Sanity check the values of TRUE and FALSE. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fxge/dib/fx_dib_composite.cpp
diff --git a/core/src/fxge/dib/fx_dib_composite.cpp b/core/src/fxge/dib/fx_dib_composite.cpp
index 89a52f3dba5ed7c6fab60e443195adc8aceb2c3b..936678d710fda45f0246f4d677d76f3eee4b5182 100644
--- a/core/src/fxge/dib/fx_dib_composite.cpp
+++ b/core/src/fxge/dib/fx_dib_composite.cpp
@@ -4056,8 +4056,8 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format,
void* icc_module,
void* pIccTransform) {
ICodec_IccModule* pIccModule = (ICodec_IccModule*)icc_module;
- FX_BOOL isSrcCmyk = src_format & 0x0400 ? TRUE : FALSE;
- FX_BOOL isDstCmyk = dest_format & 0x0400 ? TRUE : FALSE;
+ FX_BOOL isSrcCmyk = src_format & 0x0400;
Tom Sepez 2015/10/15 17:08:31 You get the picture.
Lei Zhang 2015/10/19 08:56:18 Done.
+ FX_BOOL isDstCmyk = dest_format & 0x0400;
pDestPalette = NULL;
if (pIccTransform) {
if (pSrcPalette) {
@@ -4912,7 +4912,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left,
}
int Bpp = m_bpp / 8;
FX_BOOL bAlpha = HasAlpha();
- FX_BOOL bArgb = GetFormat() == FXDIB_Argb ? TRUE : FALSE;
+ FX_BOOL bArgb = GetFormat() == FXDIB_Argb;
if (src_alpha == 255) {
for (int row = rect.top; row < rect.bottom; row++) {
uint8_t* dest_scan = m_pBuffer + row * m_Pitch + rect.left * Bpp;

Powered by Google App Engine
This is Rietveld 408576698