summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfsave.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-06-07 17:53:06 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-07 17:53:06 -0700
commit1cd352e0a4bc19f96df199b0acfa32a344240d5e (patch)
treebe24d7a4bd135c2ab5568148ab318b7bf648edda /fpdfsdk/fpdfsave.cpp
parenta4fdfc5ed0e8d2e6acc52cc34eac42c6072f0ccc (diff)
downloadpdfium-1cd352e0a4bc19f96df199b0acfa32a344240d5e.tar.xz
Get rid of NULLs in fpdfsdk/
Review-Url: https://codereview.chromium.org/2031653003
Diffstat (limited to 'fpdfsdk/fpdfsave.cpp')
-rw-r--r--fpdfsdk/fpdfsave.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp
index 9a006530c2..36f553e556 100644
--- a/fpdfsdk/fpdfsave.cpp
+++ b/fpdfsdk/fpdfsave.cpp
@@ -49,7 +49,7 @@ class CFX_IFileWrite final : public IFX_StreamWrite {
};
CFX_IFileWrite::CFX_IFileWrite() {
- m_pFileWriteStruct = NULL;
+ m_pFileWriteStruct = nullptr;
}
FX_BOOL CFX_IFileWrite::Init(FPDF_FILEWRITE* pFileWriteStruct) {
@@ -140,8 +140,8 @@ bool SaveXFADocumentData(CPDFXFA_Document* pDocument,
ScopedFileStream pTemplate(FX_CreateMemoryStream(pData, dwSize2));
pContext->UpdateChecksum(pTemplate.get());
}
- CPDF_Stream* pFormStream = NULL;
- CPDF_Stream* pDataSetsStream = NULL;
+ CPDF_Stream* pFormStream = nullptr;
+ CPDF_Stream* pDataSetsStream = nullptr;
if (iFormIndex != -1) {
// Get form CPDF_Stream
CPDF_Object* pFormPDFObj = pArray->GetObjectAt(iFormIndex);
@@ -182,7 +182,7 @@ bool SaveXFADocumentData(CPDFXFA_Document* pDocument,
if (pDataSetsStream)
pDataSetsStream->InitStreamFromFile(pDsfileWrite.get(), pDataDict);
} else {
- CPDF_Stream* pData = new CPDF_Stream(NULL, 0, NULL);
+ CPDF_Stream* pData = new CPDF_Stream(nullptr, 0, nullptr);
pData->InitStreamFromFile(pDsfileWrite.get(), pDataDict);
pPDFDocument->AddIndirectObject(pData);
iLast = pArray->GetCount() - 2;
@@ -203,7 +203,7 @@ bool SaveXFADocumentData(CPDFXFA_Document* pDocument,
if (pFormStream)
pFormStream->InitStreamFromFile(pfileWrite.get(), pDataDict);
} else {
- CPDF_Stream* pData = new CPDF_Stream(NULL, 0, NULL);
+ CPDF_Stream* pData = new CPDF_Stream(nullptr, 0, nullptr);
pData->InitStreamFromFile(pfileWrite.get(), pDataDict);
pPDFDocument->AddIndirectObject(pData);
iLast = pArray->GetCount() - 2;
@@ -290,8 +290,7 @@ bool FPDF_Doc_Save(FPDF_DOCUMENT document,
FileMaker.RemoveSecurity();
}
- CFX_IFileWrite* pStreamWrite = NULL;
- pStreamWrite = new CFX_IFileWrite;
+ CFX_IFileWrite* pStreamWrite = new CFX_IFileWrite;
pStreamWrite->Init(pFileWrite);
bool bRet = FileMaker.Create(pStreamWrite, flags);
#ifdef PDF_ENABLE_XFA