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

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

Issue 1512763013: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits 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
« no previous file with comments | « core/src/fpdfdoc/doc_formfield.cpp ('k') | core/src/fpdfdoc/doc_utils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_ocg.cpp
diff --git a/core/src/fpdfdoc/doc_ocg.cpp b/core/src/fpdfdoc/doc_ocg.cpp
index 4e0e1c5a31db3b1ea961a3a930937316500c1ccd..cfca121d36167bd878d0ac52be952eb38098b1f9 100644
--- a/core/src/fpdfdoc/doc_ocg.cpp
+++ b/core/src/fpdfdoc/doc_ocg.cpp
@@ -24,7 +24,6 @@ static int32_t FPDFDOC_OCG_FindGroup(const CPDF_Object* pObject,
static FX_BOOL FPDFDOC_OCG_HasIntent(const CPDF_Dictionary* pDict,
const CFX_ByteStringC& csElement,
const CFX_ByteStringC& csDef = "") {
- FXSYS_assert(pDict != NULL);
CPDF_Object* pIntent = pDict->GetElementValue("Intent");
if (pIntent == NULL) {
return csElement == csDef;
@@ -89,7 +88,7 @@ static CFX_ByteString FPDFDOC_OCG_GetUsageTypeString(
return csState;
}
CPDF_OCContext::CPDF_OCContext(CPDF_Document* pDoc, UsageType eUsageType) {
- FXSYS_assert(pDoc != NULL);
+ FXSYS_assert(pDoc);
m_pDocument = pDoc;
m_eUsageType = eUsageType;
}
@@ -235,9 +234,8 @@ FX_BOOL CPDF_OCContext::GetOCGVE(CPDF_Array* pExpression,
}
FX_BOOL CPDF_OCContext::LoadOCMDState(const CPDF_Dictionary* pOCMDDict,
FX_BOOL bFromConfig) {
- FXSYS_assert(pOCMDDict != NULL);
CPDF_Array* pVE = pOCMDDict->GetArray("VE");
- if (pVE != NULL) {
+ if (pVE) {
return GetOCGVE(pVE, bFromConfig);
}
CFX_ByteString csP = pOCMDDict->GetString("P", "AnyOn");
« no previous file with comments | « core/src/fpdfdoc/doc_formfield.cpp ('k') | core/src/fpdfdoc/doc_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698