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

Unified Diff: fpdfsdk/src/fsdk_baseform.cpp

Issue 1425093003: Clean up CPDF_AnnotList. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: const 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
Index: fpdfsdk/src/fsdk_baseform.cpp
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index fc45cd931b70fafed22cab533caa1f8922dfa31a..c63d2ffb358480aa372cc5132705f94db1376d1a 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -102,34 +102,23 @@ CPDF_FormField* CPDFSDK_Widget::GetFormField() const {
ASSERT(m_pInterForm != NULL);
CPDF_FormControl* pCtrl = GetFormControl();
Tom Sepez 2015/10/30 20:26:07 I thought I'd collapsed a bunch of these into:
Lei Zhang 2015/10/30 22:17:50 Done.
- ASSERT(pCtrl != NULL);
-
return pCtrl->GetField();
}
CPDF_FormControl* CPDFSDK_Widget::GetFormControl() const {
- ASSERT(m_pInterForm != NULL);
-
CPDF_InterForm* pPDFInterForm = m_pInterForm->GetInterForm();
- ASSERT(pPDFInterForm != NULL);
-
return pPDFInterForm->GetControlByDict(GetAnnotDict());
}
-CPDF_FormControl* CPDFSDK_Widget::GetFormControl(CPDF_InterForm* pInterForm,
- CPDF_Dictionary* pAnnotDict) {
- ASSERT(pInterForm != NULL);
+CPDF_FormControl* CPDFSDK_Widget::GetFormControl(
+ CPDF_InterForm* pInterForm,
+ const CPDF_Dictionary* pAnnotDict) {
ASSERT(pAnnotDict != NULL);
-
- CPDF_FormControl* pControl = pInterForm->GetControlByDict(pAnnotDict);
-
- return pControl;
+ return pInterForm->GetControlByDict(pAnnotDict);
}
int CPDFSDK_Widget::GetRotate() const {
CPDF_FormControl* pCtrl = GetFormControl();
- ASSERT(pCtrl != NULL);
-
return pCtrl->GetRotation() % 360;
}

Powered by Google App Engine
This is Rietveld 408576698