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/fxedit/fxet_list.h | |
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/fxedit/fxet_list.h')
-rw-r--r-- | fpdfsdk/include/fxedit/fxet_list.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h index 88d57c4928..a02cd8a45e 100644 --- a/fpdfsdk/include/fxedit/fxet_list.h +++ b/fpdfsdk/include/fxedit/fxet_list.h @@ -67,13 +67,11 @@ class CLST_Rect : public CFX_FloatRect { return *this; } - FX_BOOL operator==(const CLST_Rect& rect) const { + bool operator==(const CLST_Rect& rect) const { return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) == 0; } - FX_BOOL operator!=(const CLST_Rect& rect) const { - return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) != 0; - } + bool operator!=(const CLST_Rect& rect) const { return !(*this == rect); } FX_FLOAT Width() const { return right - left; } |