summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/doc_form.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-06-08 13:30:06 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-08 13:30:06 -0700
commitc1835615f386d8e6e30df89b6517ebf605335a0e (patch)
treea84b7ecfd51799e8e7ef7e481c1ee68bcb651a25 /core/fpdfdoc/doc_form.cpp
parentbc58de0409636f64200b14097e4c781ace12422d (diff)
downloadpdfium-c1835615f386d8e6e30df89b6517ebf605335a0e.tar.xz
Add some consts and remove more casts in core/
Review-Url: https://codereview.chromium.org/2049003003
Diffstat (limited to 'core/fpdfdoc/doc_form.cpp')
-rw-r--r--core/fpdfdoc/doc_form.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fpdfdoc/doc_form.cpp b/core/fpdfdoc/doc_form.cpp
index 7ecf35de37..25a9f0b72d 100644
--- a/core/fpdfdoc/doc_form.cpp
+++ b/core/fpdfdoc/doc_form.cpp
@@ -620,8 +620,7 @@ FX_BOOL CPDF_InterForm::ValidateFieldName(CFX_WideString& csNewFieldName,
FX_BOOL CPDF_InterForm::ValidateFieldName(const CPDF_FormField* pField,
CFX_WideString& csNewFieldName) {
return pField && !csNewFieldName.IsEmpty() &&
- ValidateFieldName(csNewFieldName,
- ((CPDF_FormField*)pField)->GetFieldType(), pField,
+ ValidateFieldName(csNewFieldName, pField->GetFieldType(), pField,
nullptr);
}
FX_BOOL CPDF_InterForm::ValidateFieldName(const CPDF_FormControl* pControl,
@@ -629,7 +628,7 @@ FX_BOOL CPDF_InterForm::ValidateFieldName(const CPDF_FormControl* pControl,
if (!pControl || csNewFieldName.IsEmpty()) {
return FALSE;
}
- CPDF_FormField* pField = ((CPDF_FormControl*)pControl)->GetField();
+ CPDF_FormField* pField = pControl->GetField();
return ValidateFieldName(csNewFieldName, pField->GetFieldType(), pField,
pControl);
}