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

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp

Issue 1520063002: Get rid of most instance of 'foo == NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@bstr_isnull
Patch Set: self review 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: core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
index 9e256dd50b11e66f607c675ad3ba18b68b6f8336..ba87ab072f20fa2b34bad088034b81c3c7420799 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
@@ -129,7 +129,7 @@ FX_BOOL CPDF_ShadingPattern::Load() {
CPDF_Dictionary* pShadingDict =
m_pShadingObj ? m_pShadingObj->GetDict() : NULL;
- if (pShadingDict == NULL) {
+ if (!pShadingDict) {
return FALSE;
}
if (m_nFuncs) {
@@ -151,7 +151,7 @@ FX_BOOL CPDF_ShadingPattern::Load() {
}
}
CPDF_Object* pCSObj = pShadingDict->GetElementValue("ColorSpace");
- if (pCSObj == NULL) {
+ if (!pCSObj) {
return FALSE;
}
CPDF_DocPageData* pDocPageData = m_pDocument->GetPageData();
@@ -199,7 +199,7 @@ FX_BOOL CPDF_MeshStream::Load(CPDF_Stream* pShadingStream,
m_CoordMax = m_nCoordBits == 32 ? -1 : (1 << m_nCoordBits) - 1;
m_CompMax = (1 << m_nCompBits) - 1;
CPDF_Array* pDecode = pDict->GetArray("Decode");
- if (pDecode == NULL || pDecode->GetCount() != 4 + m_nComps * 2) {
+ if (!pDecode || pDecode->GetCount() != 4 + m_nComps * 2) {
return FALSE;
}
m_xmin = pDecode->GetNumber(0);

Powered by Google App Engine
This is Rietveld 408576698