summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/doc_form.cpp
diff options
context:
space:
mode:
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);
}