summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_formfield.cpp
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 /core/fpdfdoc/cpdf_formfield.cpp
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 'core/fpdfdoc/cpdf_formfield.cpp')
-rw-r--r--core/fpdfdoc/cpdf_formfield.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/core/fpdfdoc/cpdf_formfield.cpp b/core/fpdfdoc/cpdf_formfield.cpp
index df59369723..686054f9f1 100644
--- a/core/fpdfdoc/cpdf_formfield.cpp
+++ b/core/fpdfdoc/cpdf_formfield.cpp
@@ -168,14 +168,9 @@ bool CPDF_FormField::ResetField(bool bNotify) {
int iCount = CountControls();
if (iCount) {
// TODO(weili): Check whether anything special needs to be done for
- // unison field. Otherwise, merge these branches.
- if (IsUnison(this)) {
- for (int i = 0; i < iCount; i++)
- CheckControl(i, GetControl(i)->IsDefaultChecked(), false);
- } else {
- for (int i = 0; i < iCount; i++)
- CheckControl(i, GetControl(i)->IsDefaultChecked(), false);
- }
+ // unison field. (When IsUnison(this) returns true/false.)
+ for (int i = 0; i < iCount; i++)
+ CheckControl(i, GetControl(i)->IsDefaultChecked(), false);
}
if (bNotify && m_pForm->GetFormNotify())
m_pForm->GetFormNotify()->AfterCheckedStatusChange(this);