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

Unified Diff: core/src/fpdfdoc/doc_formfield.cpp

Issue 1751753002: Remove implicit conversions and some cleanup (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 10 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
Index: core/src/fpdfdoc/doc_formfield.cpp
diff --git a/core/src/fpdfdoc/doc_formfield.cpp b/core/src/fpdfdoc/doc_formfield.cpp
index 7f85aff4d39a8b7bbdf8803d9edcc6d9b9da2bb3..3b6980bcb86ede561cba2fde7af17797fe040b71 100644
--- a/core/src/fpdfdoc/doc_formfield.cpp
+++ b/core/src/fpdfdoc/doc_formfield.cpp
@@ -235,13 +235,13 @@ int CPDF_FormField::GetFieldType() {
}
return FIELDTYPE_UNKNOWN;
}
+
CPDF_AAction CPDF_FormField::GetAdditionalAction() {
CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "AA");
- if (!pObj) {
- return NULL;
- }
- return pObj->GetDict();
+ CPDF_Dictionary* dict = pObj ? pObj->GetDict() : nullptr;
+ return CPDF_AAction(dict);
Tom Sepez 2016/03/01 17:53:35 Nit: local |dict| only used once, so combine with
Wei Li 2016/03/01 21:46:53 Done.
}
+
CFX_WideString CPDF_FormField::GetAlternateName() {
CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "TU");
if (!pObj) {

Powered by Google App Engine
This is Rietveld 408576698