summaryrefslogtreecommitdiff
path: root/core/include/fxge
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/include/fxge
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/include/fxge')
-rw-r--r--core/include/fxge/fx_dib.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h
index 3043e7547c..e39bad2b87 100644
--- a/core/include/fxge/fx_dib.h
+++ b/core/include/fxge/fx_dib.h
@@ -199,13 +199,10 @@ class CFX_DIBSource {
// TODO(thestig): Investigate this. Given the possible values of FXDIB_Format,
// it feels as though this should be implemented as !!(m_AlphaFlag & 1) and
// IsOpaqueImage() below should never be able to return TRUE.
- FX_BOOL IsAlphaMask() const { return m_AlphaFlag == 1; }
-
- FX_BOOL HasAlpha() const { return !!(m_AlphaFlag & 2); }
-
- FX_BOOL IsOpaqueImage() const { return !(m_AlphaFlag & 3); }
-
- FX_BOOL IsCmykImage() const { return !!(m_AlphaFlag & 4); }
+ bool IsAlphaMask() const { return m_AlphaFlag == 1; }
+ bool HasAlpha() const { return !!(m_AlphaFlag & 2); }
+ bool IsOpaqueImage() const { return !(m_AlphaFlag & 3); }
+ bool IsCmykImage() const { return !!(m_AlphaFlag & 4); }
int GetPaletteSize() const {
return IsAlphaMask() ? 0 : (m_bpp == 1 ? 2 : (m_bpp == 8 ? 256 : 0));