From 4997b22f84307521a62838f874928bf56cd3423c Mon Sep 17 00:00:00 2001 From: thestig Date: Tue, 7 Jun 2016 10:46:22 -0700 Subject: Get rid of NULLs in core/ Review-Url: https://codereview.chromium.org/2032613003 --- core/fxcodec/jbig2/JBig2_Context.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'core/fxcodec/jbig2/JBig2_Context.cpp') diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp index 25c9ff7649..8dde290be6 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 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; } -- cgit v1.2.3