diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-02-26 14:31:56 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-02-26 14:31:56 -0800 |
commit | 007e6c0f9559412788b903bcb6a7601e220c3be8 (patch) | |
tree | a2c6bb85eaa2b63fd24ed70fd3c6ddad54e219d5 /fpdfsdk/include/pdfwindow | |
parent | 281a9eadff15b167e2ee3032e21b83190ad49125 (diff) | |
download | pdfium-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 'fpdfsdk/include/pdfwindow')
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_Wnd.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h index 19046e6c9c..493cdc0874 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h +++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h @@ -134,7 +134,7 @@ struct CPWL_Color { FX_FLOAT fColor1, fColor2, fColor3, fColor4; }; -inline FX_BOOL operator==(const CPWL_Color& c1, const CPWL_Color& c2) { +inline bool operator==(const CPWL_Color& c1, const CPWL_Color& c2) { return c1.nColorType == c2.nColorType && c1.fColor1 - c2.fColor1 < 0.0001 && c1.fColor1 - c2.fColor1 > -0.0001 && c1.fColor2 - c2.fColor2 < 0.0001 && @@ -144,8 +144,8 @@ inline FX_BOOL operator==(const CPWL_Color& c1, const CPWL_Color& c2) { c1.fColor4 - c2.fColor4 < 0.0001 && c1.fColor4 - c2.fColor4 > -0.0001; } -inline FX_BOOL operator!=(const CPWL_Color& c1, const CPWL_Color& c2) { - return !operator==(c1, c2); +inline bool operator!=(const CPWL_Color& c1, const CPWL_Color& c2) { + return !(c1 == c2); } #define PWL_SCROLLBAR_WIDTH 12.0f |