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 . --- fpdfsdk/include/pdfwindow/PWL_Wnd.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fpdfsdk/include/pdfwindow') 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 -- cgit v1.2.3