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

Unified Diff: core/fxcodec/jbig2/JBig2_Context.cpp

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: s/NULL/nullptr/ Created 4 years, 7 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
Index: core/fxcodec/jbig2/JBig2_Context.cpp
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp
index a0a411fbcfd17d3c82674c76808de8ed46debec8..f0f621b6d8db7240d53eb63057452a5f3c20aeaf 100644
--- a/core/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/fxcodec/jbig2/JBig2_Context.cpp
@@ -69,7 +69,7 @@ CJBig2_Context::CJBig2_Context(CPDF_StreamAcc* pGlobalStream,
m_PauseStep(10),
m_pPause(pPause),
m_ProcessingStatus(FXCODEC_STATUS_FRAME_READY),
- m_gbContext(NULL),
+ m_gbContext(nullptr),
m_dwOffset(0),
m_pSymbolDictCache(pSymbolDictCache),
m_bIsGlobal(bIsGlobal) {
@@ -85,9 +85,9 @@ CJBig2_Context::CJBig2_Context(CPDF_StreamAcc* pGlobalStream,
CJBig2_Context::~CJBig2_Context() {
FX_Free(m_gbContext);
- m_gbContext = NULL;
+ m_gbContext = nullptr;
delete m_pGlobalContext;
- m_pGlobalContext = NULL;
+ m_pGlobalContext = nullptr;
}
int32_t CJBig2_Context::decode_SquentialOrgnazation(IFX_Pause* pPause) {
@@ -259,7 +259,7 @@ CJBig2_Segment* CJBig2_Context::findReferredSegmentByTypeAndIndex(
++count;
}
}
- return NULL;
+ return nullptr;
}
int32_t CJBig2_Context::parseSegmentHeader(CJBig2_Segment* pSegment) {
if (m_pStream->readInteger(&pSegment->m_dwNumber) != 0 ||
@@ -737,7 +737,7 @@ int32_t CJBig2_Context::parseTextRegion(CJBig2_Segment* pSegment) {
}
pTRD->SBSYMS = SBSYMS.get();
} else {
- pTRD->SBSYMS = NULL;
+ pTRD->SBSYMS = nullptr;
}
std::unique_ptr<JBig2HuffmanCode, FxFreeDeleter> SBSYMCODES;
@@ -946,7 +946,7 @@ int32_t CJBig2_Context::parseTextRegion(CJBig2_Segment* pSegment) {
m_pPage->composeFrom(ri.x, ri.y, pSegment->m_Result.im,
(JBig2ComposeOp)(ri.flags & 0x03));
delete pSegment->m_Result.im;
- pSegment->m_Result.im = NULL;
+ pSegment->m_Result.im = nullptr;
}
return JBIG2_SUCCESS;
}
@@ -1064,7 +1064,7 @@ int32_t CJBig2_Context::parseHalftoneRegion(CJBig2_Segment* pSegment,
m_pPage->composeFrom(ri.x, ri.y, pSegment->m_Result.im,
(JBig2ComposeOp)(ri.flags & 0x03));
delete pSegment->m_Result.im;
- pSegment->m_Result.im = NULL;
+ pSegment->m_Result.im = nullptr;
}
return JBIG2_SUCCESS;
}
@@ -1137,7 +1137,7 @@ int32_t CJBig2_Context::parseGenericRegion(CJBig2_Segment* pSegment,
} else {
m_pArithDecoder.reset();
FX_Free(m_gbContext);
- m_gbContext = NULL;
+ m_gbContext = nullptr;
if (!pSegment->m_Result.im) {
m_ProcessingStatus = FXCODEC_STATUS_ERROR;
m_pGRD.reset();
@@ -1168,7 +1168,7 @@ int32_t CJBig2_Context::parseGenericRegion(CJBig2_Segment* pSegment,
pSegment->m_Result.im,
(JBig2ComposeOp)(m_ri.flags & 0x03), &Rect);
delete pSegment->m_Result.im;
- pSegment->m_Result.im = NULL;
+ pSegment->m_Result.im = nullptr;
}
m_pGRD.reset();
return JBIG2_SUCCESS;
@@ -1238,7 +1238,7 @@ int32_t CJBig2_Context::parseGenericRefinementRegion(CJBig2_Segment* pSegment) {
m_pPage->composeFrom(ri.x, ri.y, pSegment->m_Result.im,
(JBig2ComposeOp)(ri.flags & 0x03));
delete pSegment->m_Result.im;
- pSegment->m_Result.im = NULL;
+ pSegment->m_Result.im = nullptr;
}
return JBIG2_SUCCESS;
}

Powered by Google App Engine
This is Rietveld 408576698