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

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: 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: 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 5ead9a5beaee550ffea0d8332a8cdcd08fcbd576..fc050b936929c4631d61c39694ffe05c9b552382 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);
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698