diff options
author | thestig <thestig@chromium.org> | 2016-06-07 10:46:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-07 10:46:23 -0700 |
commit | 4997b22f84307521a62838f874928bf56cd3423c (patch) | |
tree | ad11d99ac0a491ee222e9d0a42ec3b6ad3354e2a /core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp | |
parent | 0687e76dc259c678b3f29a6608331f07ffd8f1e2 (diff) | |
download | pdfium-4997b22f84307521a62838f874928bf56cd3423c.tar.xz |
Get rid of NULLs in core/
Review-Url: https://codereview.chromium.org/2032613003
Diffstat (limited to 'core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp index 5bac23e137..42adb84638 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp @@ -43,7 +43,7 @@ CPDF_StreamParser::CPDF_StreamParser(const uint8_t* pData, uint32_t dwSize) { m_pBuf = pData; m_Size = dwSize; m_Pos = 0; - m_pLastObj = NULL; + m_pLastObj = nullptr; } CPDF_StreamParser::~CPDF_StreamParser() { @@ -168,30 +168,30 @@ CPDF_Stream* CPDF_StreamParser::ReadInlineStream(CPDF_Document* pDoc, } uint32_t pitch = width; if (bpc && pitch > INT_MAX / bpc) { - return NULL; + return nullptr; } pitch *= bpc; if (nComponents && pitch > INT_MAX / nComponents) { - return NULL; + return nullptr; } pitch *= nComponents; if (pitch > INT_MAX - 7) { - return NULL; + return nullptr; } pitch += 7; pitch /= 8; OrigSize = pitch; } else { if (width > INT_MAX - 7) { - return NULL; + return nullptr; } OrigSize = ((width + 7) / 8); } if (height && OrigSize > INT_MAX / height) { - return NULL; + return nullptr; } OrigSize *= height; - uint8_t* pData = NULL; + uint8_t* pData = nullptr; uint32_t dwStreamSize; if (Decoder.IsEmpty()) { if (OrigSize > m_Size - m_Pos) { @@ -208,7 +208,7 @@ CPDF_Stream* CPDF_StreamParser::ReadInlineStream(CPDF_Document* pDoc, Decoder, pParam, pData, dwDestSize); FX_Free(pData); if ((int)dwStreamSize < 0) - return NULL; + return nullptr; uint32_t dwSavePos = m_Pos; m_Pos += dwStreamSize; @@ -714,7 +714,7 @@ void CPDF_ContentParser::Start(CPDF_Form* pForm, pData->m_BlendType = FXDIB_BLEND_NORMAL; pData->m_StrokeAlpha = 1.0f; pData->m_FillAlpha = 1.0f; - pData->m_pSoftMask = NULL; + pData->m_pSoftMask = nullptr; } m_nStreams = 0; m_pSingleStream.reset(new CPDF_StreamAcc); |