Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: fpdfsdk/src/fsdk_baseform.cpp

Issue 1428583003: Use static_cast for various CPDF_Object conversions. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfdoc/doc_form.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fsdk_baseform.cpp
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index fad28e7b676ea052dca62cee8bde8a4e9d58e3d9..d1f1aedba9aaf1214975776d6a613645d241690b 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -2191,14 +2191,14 @@ void CPDFSDK_InterForm::GetFieldFromObjects(const CFX_PtrArray& objects,
int iCount = objects.GetSize();
for (int i = 0; i < iCount; i++) {
- CPDF_Object* pObject = (CPDF_Object*)objects[i];
- if (pObject == NULL)
+ CPDF_Object* pObject = static_cast<CPDF_Object*>(objects[i]);
+ if (!pObject)
continue;
if (pObject->IsString()) {
CFX_WideString csName = pObject->GetUnicodeText();
CPDF_FormField* pField = m_pInterForm->GetField(0, csName);
- if (pField != NULL)
+ if (pField)
fields.Add(pField);
} else if (pObject->IsDictionary()) {
if (m_pInterForm->IsValidFormField(pObject))
« no previous file with comments | « core/src/fpdfdoc/doc_form.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698