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

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_content.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
« no previous file with comments | « core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp ('k') | core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
index eda51deb3b711d1750b5063feae34c97623309a8..5810da572bde7bb1df84347d8676abcc3c4cdebb 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
@@ -56,13 +56,13 @@ void CPDF_PageContentGenerate::GenerateContent() {
CFX_ByteString CPDF_PageContentGenerate::RealizeResource(
CPDF_Object* pResourceObj,
const FX_CHAR* szType) {
- if (m_pPage->m_pResources == NULL) {
+ if (!m_pPage->m_pResources) {
m_pPage->m_pResources = new CPDF_Dictionary;
int objnum = m_pDocument->AddIndirectObject(m_pPage->m_pResources);
m_pPage->m_pFormDict->SetAtReference("Resources", m_pDocument, objnum);
}
CPDF_Dictionary* pResList = m_pPage->m_pResources->GetDict(szType);
- if (pResList == NULL) {
+ if (!pResList) {
pResList = new CPDF_Dictionary;
m_pPage->m_pResources->SetAt(szType, pResList);
}
« no previous file with comments | « core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp ('k') | core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698