diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-16 20:53:58 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-16 20:53:58 +0000 |
commit | b2e6b4c44a38ea2ca9e021df31cd27eb67a45e35 (patch) | |
tree | 8e9392c73c3905d38d9e9e636adf8df9c7af072e /core/fpdfdoc/cpdf_interform.cpp | |
parent | aa987a9a895d42749c0f5e4092618fe7ded6667e (diff) | |
download | pdfium-b2e6b4c44a38ea2ca9e021df31cd27eb67a45e35.tar.xz |
Replace optional bool bNotify with enum type.
Adds clarity to the call sites.
Change-Id: Id4deed9adda2ad79f0847d618792429044d4f7d6
Reviewed-on: https://pdfium-review.googlesource.com/40351
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_interform.cpp')
-rw-r--r-- | core/fpdfdoc/cpdf_interform.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp index 953c96234c..97d22a2a93 100644 --- a/core/fpdfdoc/cpdf_interform.cpp +++ b/core/fpdfdoc/cpdf_interform.cpp @@ -815,7 +815,7 @@ int CPDF_InterForm::GetFormAlignment() const { void CPDF_InterForm::ResetForm(const std::vector<CPDF_FormField*>& fields, bool bIncludeOrExclude, - bool bNotify) { + NotificationOption notify) { size_t nCount = m_pFieldTree->m_Root.CountFields(); for (size_t i = 0; i < nCount; ++i) { CPDF_FormField* pField = m_pFieldTree->m_Root.GetFieldAtIndex(i); @@ -823,22 +823,22 @@ void CPDF_InterForm::ResetForm(const std::vector<CPDF_FormField*>& fields, continue; if (bIncludeOrExclude == pdfium::ContainsValue(fields, pField)) - pField->ResetField(bNotify); + pField->ResetField(notify); } - if (bNotify && m_pFormNotify) + if (notify == NotificationOption::kNotify && m_pFormNotify) m_pFormNotify->AfterFormReset(this); } -void CPDF_InterForm::ResetForm(bool bNotify) { +void CPDF_InterForm::ResetForm(NotificationOption notify) { size_t nCount = m_pFieldTree->m_Root.CountFields(); for (size_t i = 0; i < nCount; ++i) { CPDF_FormField* pField = m_pFieldTree->m_Root.GetFieldAtIndex(i); if (!pField) continue; - pField->ResetField(bNotify); + pField->ResetField(notify); } - if (bNotify && m_pFormNotify) + if (notify == NotificationOption::kNotify && m_pFormNotify) m_pFormNotify->AfterFormReset(this); } |