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

Unified Diff: fpdfsdk/src/fsdk_baseannot.cpp

Issue 1512763013: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years 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_baseannot.cpp
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp
index e124ace2a340c4035c874e7de7d55d626ab63827..663e3a7105948d883ca53e63cb455a98be259e28 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/src/fsdk_baseannot.cpp
@@ -528,8 +528,6 @@ void CPDFSDK_Annot::SetTabOrder(int iTabOrder) {
}
CPDF_Dictionary* CPDFSDK_BAAnnot::GetAnnotDict() const {
- ASSERT(m_pAnnot != NULL);
-
return m_pAnnot->GetAnnotDict();
}
@@ -541,17 +539,12 @@ void CPDFSDK_BAAnnot::SetRect(const CPDF_Rect& rect) {
}
CPDF_Rect CPDFSDK_BAAnnot::GetRect() const {
- ASSERT(m_pAnnot != NULL);
-
CPDF_Rect rect;
m_pAnnot->GetRect(rect);
Tom Sepez 2015/12/14 19:14:11 Oh, someday to assume RVO and to have GetRect retu
Lei Zhang 2015/12/15 01:38:33 Acknowledged.
-
return rect;
}
CFX_ByteString CPDFSDK_BAAnnot::GetType() const {
- ASSERT(m_pAnnot != NULL);
-
return m_pAnnot->GetSubType();
}
@@ -563,9 +556,6 @@ void CPDFSDK_BAAnnot::DrawAppearance(CFX_RenderDevice* pDevice,
const CPDF_Matrix* pUser2Device,
CPDF_Annot::AppearanceMode mode,
const CPDF_RenderOptions* pOptions) {
- ASSERT(m_pPageView != NULL);
- ASSERT(m_pAnnot != NULL);
-
m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device,
mode, pOptions);
}
@@ -599,12 +589,10 @@ FX_BOOL CPDFSDK_BAAnnot::IsAppearanceValid(CPDF_Annot::AppearanceMode mode) {
void CPDFSDK_BAAnnot::DrawBorder(CFX_RenderDevice* pDevice,
const CPDF_Matrix* pUser2Device,
const CPDF_RenderOptions* pOptions) {
- ASSERT(m_pAnnot != NULL);
m_pAnnot->DrawBorder(pDevice, pUser2Device, pOptions);
}
void CPDFSDK_BAAnnot::ClearCachedAP() {
- ASSERT(m_pAnnot != NULL);
m_pAnnot->ClearCachedAP();
}
@@ -944,8 +932,6 @@ CPDF_AAction CPDFSDK_BAAnnot::GetAAction() const {
}
void CPDFSDK_BAAnnot::SetAAction(const CPDF_AAction& aa) {
- ASSERT(aa != NULL);
-
if ((CPDF_AAction&)aa != m_pAnnot->GetAnnotDict()->GetDict("AA"))
m_pAnnot->GetAnnotDict()->SetAt("AA", (CPDF_AAction&)aa);
}

Powered by Google App Engine
This is Rietveld 408576698