From c1835615f386d8e6e30df89b6517ebf605335a0e Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 8 Jun 2016 13:30:06 -0700 Subject: Add some consts and remove more casts in core/ Review-Url: https://codereview.chromium.org/2049003003 --- core/fpdfdoc/doc_form.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'core/fpdfdoc/doc_form.cpp') 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); } -- cgit v1.2.3