summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_widget.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-09-15 15:43:11 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-09-15 22:54:34 +0000
commit7b1e53c0ef09da360304c6f4397082d09a945a7e (patch)
tree0167576535814d271950c4aea24071c4e7b6afce /fpdfsdk/cpdfsdk_widget.cpp
parent134ac9105586407eb3b1e06001101ff893dd4a31 (diff)
downloadpdfium-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/cpdfsdk_widget.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index 60a4d52657..0183f587cf 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -57,7 +57,7 @@ CPDFSDK_Widget::CPDFSDK_Widget(CPDF_Annot* pAnnot,
CPDFSDK_InterForm* pInterForm)
: CPDFSDK_BAAnnot(pAnnot, pPageView),
m_pInterForm(pInterForm),
- m_nAppAge(0),
+ m_nAppearanceAge(0),
m_nValueAge(0)
#ifdef PDF_ENABLE_XFA
,
@@ -757,9 +757,7 @@ void CPDFSDK_Widget::ResetAppearance(const CFX_WideString* sValue,
bool bValueChanged) {
SetAppModified();
- m_nAppAge++;
- if (m_nAppAge > 999999)
- m_nAppAge = 0;
+ m_nAppearanceAge++;
if (bValueChanged)
m_nValueAge++;
@@ -1048,11 +1046,3 @@ CFX_WideString CPDFSDK_Widget::GetAlternateName() const {
CPDF_FormField* pFormField = GetFormField();
return pFormField->GetAlternateName();
}
-
-int32_t CPDFSDK_Widget::GetAppearanceAge() const {
- return m_nAppAge;
-}
-
-int32_t CPDFSDK_Widget::GetValueAge() const {
- return m_nValueAge;
-}