diff options
author | thestig <thestig@chromium.org> | 2016-06-07 17:53:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-07 17:53:06 -0700 |
commit | 1cd352e0a4bc19f96df199b0acfa32a344240d5e (patch) | |
tree | be24d7a4bd135c2ab5568148ab318b7bf648edda /fpdfsdk/fpdf_flatten.cpp | |
parent | a4fdfc5ed0e8d2e6acc52cc34eac42c6072f0ccc (diff) | |
download | pdfium-1cd352e0a4bc19f96df199b0acfa32a344240d5e.tar.xz |
Get rid of NULLs in fpdfsdk/
Review-Url: https://codereview.chromium.org/2031653003
Diffstat (limited to 'fpdfsdk/fpdf_flatten.cpp')
-rw-r--r-- | fpdfsdk/fpdf_flatten.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp index 27646255c8..bc1a1ccc60 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); |