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

Unified Diff: fpdfsdk/fpdf_flatten.cpp

Issue 2031653003: Get rid of NULLs in fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_core
Patch Set: rebase Created 4 years, 6 months 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 | « fpdfsdk/fpdf_ext.cpp ('k') | fpdfsdk/fpdf_sysfontinfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdf_flatten.cpp
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
index 27646255c8b83bceb297a99ca8d27b9451abb72a..bc1a1ccc60676fba5f5561e85b7c706e6fb2177e 100644
--- a/fpdfsdk/fpdf_flatten.cpp
+++ b/fpdfsdk/fpdf_flatten.cpp
@@ -195,7 +195,8 @@ void SetPageContents(CFX_ByteString key,
if (!pContentsObj) {
// Create a new contents dictionary
if (!key.IsEmpty()) {
- CPDF_Stream* pNewContents = new CPDF_Stream(NULL, 0, new CPDF_Dictionary);
+ CPDF_Stream* pNewContents =
+ new CPDF_Stream(nullptr, 0, new CPDF_Dictionary);
pPage->SetAtReference("Contents", pDocument,
pDocument->AddIndirectObject(pNewContents));
@@ -207,7 +208,7 @@ void SetPageContents(CFX_ByteString key,
return;
}
- CPDF_Array* pContentsArray = NULL;
+ CPDF_Array* pContentsArray = nullptr;
switch (pContentsObj->GetType()) {
case CPDF_Object::STREAM: {
@@ -240,7 +241,8 @@ void SetPageContents(CFX_ByteString key,
pPage->SetAtReference("Contents", pDocument, dwObjNum);
if (!key.IsEmpty()) {
- CPDF_Stream* pNewContents = new CPDF_Stream(NULL, 0, new CPDF_Dictionary);
+ CPDF_Stream* pNewContents =
+ new CPDF_Stream(nullptr, 0, new CPDF_Dictionary);
dwObjNum = pDocument->AddIndirectObject(pNewContents);
pContentsArray->AddReference(pDocument, dwObjNum);
@@ -377,7 +379,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
pPageDict->SetAt("Resources", pRes);
}
- CPDF_Stream* pNewXObject = new CPDF_Stream(NULL, 0, new CPDF_Dictionary);
+ CPDF_Stream* pNewXObject = new CPDF_Stream(nullptr, 0, new CPDF_Dictionary);
uint32_t dwObjNum = pDocument->AddIndirectObject(pNewXObject);
CPDF_Dictionary* pPageXObject = pRes->GetDictBy("XObject");
if (!pPageXObject) {
@@ -400,7 +402,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
SetPageContents(key, pPageDict, pDocument);
- CPDF_Dictionary* pNewXORes = NULL;
+ CPDF_Dictionary* pNewXORes = nullptr;
if (!key.IsEmpty()) {
pPageXObject->SetAtReference(key, pDocument, dwObjNum);
« no previous file with comments | « fpdfsdk/fpdf_ext.cpp ('k') | fpdfsdk/fpdf_sysfontinfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698