summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-01-29 15:30:46 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-29 15:30:46 +0000
commitbc4869293d7869c06e3f8c18241447ec5b701b58 (patch)
tree00f8bbe2e40223dac30951ef0ae684228381f81b /fpdfsdk
parent580f5dc88e3cbe8ed08661b829e2f560870e8b71 (diff)
downloadpdfium-bc4869293d7869c06e3f8c18241447ec5b701b58.tar.xz
Fix identical if/else blocks.
The CPWL_EditImpl::Backspace() instance occurred in commit 671a799. The other two instances where known cases. BUG=chromium:805881 Change-Id: Iae7cb8534e85342069d8753ced88543dad751e92 Reviewed-on: https://pdfium-review.googlesource.com/24050 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/pwl/cpwl_edit_impl.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/fpdfsdk/pwl/cpwl_edit_impl.cpp b/fpdfsdk/pwl/cpwl_edit_impl.cpp
index a2a7b1dddf..1881ba2c28 100644
--- a/fpdfsdk/pwl/cpwl_edit_impl.cpp
+++ b/fpdfsdk/pwl/cpwl_edit_impl.cpp
@@ -1576,13 +1576,8 @@ bool CPWL_EditImpl::Backspace(bool bAddUndo, bool bPaint) {
return false;
if (bAddUndo && m_bEnableUndo) {
- if (m_wpCaret.nSecIndex != m_wpOldCaret.nSecIndex) {
- AddEditUndoItem(pdfium::MakeUnique<CFXEU_Backspace>(
- this, m_wpOldCaret, m_wpCaret, word.Word, word.nCharset));
- } else {
- AddEditUndoItem(pdfium::MakeUnique<CFXEU_Backspace>(
- this, m_wpOldCaret, m_wpCaret, word.Word, word.nCharset));
- }
+ AddEditUndoItem(pdfium::MakeUnique<CFXEU_Backspace>(
+ this, m_wpOldCaret, m_wpCaret, word.Word, word.nCharset));
}
if (bPaint) {
RearrangePart(CPVT_WordRange(m_wpCaret, m_wpOldCaret));