diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-09-15 15:43:11 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-15 22:54:34 +0000 |
commit | 7b1e53c0ef09da360304c6f4397082d09a945a7e (patch) | |
tree | 0167576535814d271950c4aea24071c4e7b6afce /fpdfsdk/formfiller/cffl_formfiller.cpp | |
parent | 134ac9105586407eb3b1e06001101ff893dd4a31 (diff) | |
download | pdfium-7b1e53c0ef09da360304c6f4397082d09a945a7e.tar.xz |
Use unsigned types for app age, value age in widgets.chromium/3218chromium/3217
Then if they roll over, it doesn't matter, since we only check for change.
And then we can pull a silly check. Then remove some no-op calls where we
didn't use the result.
Change-Id: I35ba470b42fb8c32a6984999e0311b21729791ca
Reviewed-on: https://pdfium-review.googlesource.com/14210
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller/cffl_formfiller.cpp')
-rw-r--r-- | fpdfsdk/formfiller/cffl_formfiller.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp index e59cd0520f..fd569c7201 100644 --- a/fpdfsdk/formfiller/cffl_formfiller.cpp +++ b/fpdfsdk/formfiller/cffl_formfiller.cpp @@ -361,8 +361,8 @@ CPWL_Wnd* CFFL_FormFiller::GetPDFWindow(CPDFSDK_PageView* pPageView, auto* pPrivateData = new CFFL_PrivateData; pPrivateData->pWidget = m_pWidget.Get(); pPrivateData->pPageView = pPageView; - pPrivateData->nWidgetAge = m_pWidget->GetAppearanceAge(); - pPrivateData->nValueAge = 0; + pPrivateData->nWidgetAppearanceAge = m_pWidget->GetAppearanceAge(); + pPrivateData->nWidgetValueAge = 0; cp.pAttachedData = pPrivateData; CPWL_Wnd* pNewWnd = NewPDFWindow(cp); m_Maps[pPageView] = pNewWnd; @@ -370,11 +370,11 @@ CPWL_Wnd* CFFL_FormFiller::GetPDFWindow(CPDFSDK_PageView* pPageView, } auto* pPrivateData = static_cast<CFFL_PrivateData*>(pWnd->GetAttachedData()); - if (pPrivateData->nWidgetAge == m_pWidget->GetAppearanceAge()) + if (pPrivateData->nWidgetAppearanceAge == m_pWidget->GetAppearanceAge()) return pWnd; - return ResetPDFWindow(pPageView, - m_pWidget->GetValueAge() == pPrivateData->nValueAge); + return ResetPDFWindow( + pPageView, pPrivateData->nWidgetValueAge == m_pWidget->GetValueAge()); } void CFFL_FormFiller::DestroyPDFWindow(CPDFSDK_PageView* pPageView) { |