summaryrefslogtreecommitdiff
path: root/core/include/fpdfdoc/fpdf_vt.h
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/fpdfdoc/fpdf_vt.h
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/fpdfdoc/fpdf_vt.h')
-rw-r--r--core/include/fpdfdoc/fpdf_vt.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/include/fpdfdoc/fpdf_vt.h b/core/include/fpdfdoc/fpdf_vt.h
index b2e64cd2ed..8a2e7e93aa 100644
--- a/core/include/fpdfdoc/fpdf_vt.h
+++ b/core/include/fpdfdoc/fpdf_vt.h
@@ -32,15 +32,12 @@ struct CPVT_WordPlace {
void Default() { nSecIndex = nLineIndex = nWordIndex = -1; }
- FX_BOOL operator==(const CPVT_WordPlace& wp) const {
+ bool operator==(const CPVT_WordPlace& wp) const {
return wp.nSecIndex == nSecIndex && wp.nLineIndex == nLineIndex &&
wp.nWordIndex == nWordIndex;
}
- FX_BOOL operator!=(const CPVT_WordPlace& wp) const {
- return wp.nSecIndex != nSecIndex || wp.nLineIndex != nLineIndex ||
- wp.nWordIndex != nWordIndex;
- }
+ FX_BOOL operator!=(const CPVT_WordPlace& wp) const { return !(*this == wp); }
inline int32_t WordCmp(const CPVT_WordPlace& wp) const {
if (nSecIndex > wp.nSecIndex) {