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

Unified Diff: fpdfsdk/fpdfsave.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/fpdfformfill.cpp ('k') | fpdfsdk/fpdfview.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfsave.cpp
diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp
index 9a006530c24d5ddb3e8869c9d6db4ab291feb6e6..36f553e55616dbc42aae0c5422b3cbbf68cdb90c 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
« no previous file with comments | « fpdfsdk/fpdfformfill.cpp ('k') | fpdfsdk/fpdfview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698