summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-01-29 17:32:36 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-29 17:32:36 +0000
commit2f7a01849e698b3d63e79d7e8bf04a6346fa248e (patch)
tree23715d368e8c3a5597ac3e1c7c886ad369b001bf
parentbc4869293d7869c06e3f8c18241447ec5b701b58 (diff)
downloadpdfium-2f7a01849e698b3d63e79d7e8bf04a6346fa248e.tar.xz
Remove redundant checks in CPVT_WordRange::Intersect().
BUG=chromium:805881 Change-Id: I5ff76067fb26198df13482e6c475138142b3f6c5 Reviewed-on: https://pdfium-review.googlesource.com/24192 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
-rw-r--r--core/fpdfdoc/cpvt_wordrange.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/fpdfdoc/cpvt_wordrange.h b/core/fpdfdoc/cpvt_wordrange.h
index 638f6c17c0..5426154783 100644
--- a/core/fpdfdoc/cpvt_wordrange.h
+++ b/core/fpdfdoc/cpvt_wordrange.h
@@ -43,10 +43,8 @@ struct CPVT_WordRange {
}
CPVT_WordRange Intersect(const CPVT_WordRange& that) const {
- if (that.EndPos < BeginPos || that.BeginPos > EndPos ||
- EndPos < that.BeginPos || BeginPos > that.EndPos) {
+ if (that.EndPos < BeginPos || that.BeginPos > EndPos)
return CPVT_WordRange();
- }
return CPVT_WordRange(std::max(BeginPos, that.BeginPos),
std::min(EndPos, that.EndPos));