diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-24 21:55:21 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-24 21:55:21 +0000 |
commit | d8a3bc9ce941062fa4dd8cc2d03b16af402adafe (patch) | |
tree | 1f87a6c3b4b77738c5cf7ec7a16101b82f731eff | |
parent | 9cbc37b4a5bfb3932e5f9a50c552d7b913178337 (diff) | |
download | pdfium-d8a3bc9ce941062fa4dd8cc2d03b16af402adafe.tar.xz |
Use ASSERT() consistently. Replace assert() usage.
ASSERT() is PDFium's wrapper for cross-platform wrapper for assert().
Change-Id: Ie2a98a8e1de101f93aa9bf667d6f125d11d129cd
Reviewed-on: https://pdfium-review.googlesource.com/c/44539
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
-rw-r--r-- | core/fpdfapi/page/cpdf_docpagedata.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_shadingpattern.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_tilingpattern.cpp | 2 | ||||
-rw-r--r-- | fxbarcode/oned/BC_OnedCode128Writer.cpp | 2 | ||||
-rw-r--r-- | fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_nodeowner.cpp | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/core/fpdfapi/page/cpdf_docpagedata.cpp b/core/fpdfapi/page/cpdf_docpagedata.cpp index 2cb87e7213..7b62467304 100644 --- a/core/fpdfapi/page/cpdf_docpagedata.cpp +++ b/core/fpdfapi/page/cpdf_docpagedata.cpp @@ -30,7 +30,7 @@ CPDF_DocPageData::CPDF_DocPageData(CPDF_Document* pPDFDoc) : m_bForceClear(false), m_pPDFDoc(pPDFDoc) { - assert(m_pPDFDoc); + ASSERT(m_pPDFDoc); } CPDF_DocPageData::~CPDF_DocPageData() { diff --git a/core/fpdfapi/page/cpdf_shadingpattern.cpp b/core/fpdfapi/page/cpdf_shadingpattern.cpp index 79ea6f84ec..bb0291dd71 100644 --- a/core/fpdfapi/page/cpdf_shadingpattern.cpp +++ b/core/fpdfapi/page/cpdf_shadingpattern.cpp @@ -33,7 +33,7 @@ CPDF_ShadingPattern::CPDF_ShadingPattern(CPDF_Document* pDoc, : CPDF_Pattern(pDoc, bShading ? nullptr : pPatternObj, parentMatrix), m_bShadingObj(bShading), m_pShadingObj(pPatternObj) { - assert(document()); + ASSERT(document()); if (!bShading) { m_pShadingObj = pattern_obj()->GetDict()->GetDirectObjectFor("Shading"); SetPatternToFormMatrix(); diff --git a/core/fpdfapi/page/cpdf_tilingpattern.cpp b/core/fpdfapi/page/cpdf_tilingpattern.cpp index 3cbfa07fa4..faa7eb8fe2 100644 --- a/core/fpdfapi/page/cpdf_tilingpattern.cpp +++ b/core/fpdfapi/page/cpdf_tilingpattern.cpp @@ -16,7 +16,7 @@ CPDF_TilingPattern::CPDF_TilingPattern(CPDF_Document* pDoc, CPDF_Object* pPatternObj, const CFX_Matrix& parentMatrix) : CPDF_Pattern(pDoc, pPatternObj, parentMatrix) { - assert(document()); + ASSERT(document()); m_bColored = pattern_obj()->GetDict()->GetIntegerFor("PaintType") == 1; SetPatternToFormMatrix(); } diff --git a/fxbarcode/oned/BC_OnedCode128Writer.cpp b/fxbarcode/oned/BC_OnedCode128Writer.cpp index ad94d296ec..7a162803af 100644 --- a/fxbarcode/oned/BC_OnedCode128Writer.cpp +++ b/fxbarcode/oned/BC_OnedCode128Writer.cpp @@ -78,7 +78,7 @@ const int32_t CODE_STOP = 106; CBC_OnedCode128Writer::CBC_OnedCode128Writer(BC_TYPE type) : m_codeFormat(type) { - assert(m_codeFormat == BC_CODE128_B || m_codeFormat == BC_CODE128_C); + ASSERT(m_codeFormat == BC_CODE128_B || m_codeFormat == BC_CODE128_C); } CBC_OnedCode128Writer::~CBC_OnedCode128Writer() = default; diff --git a/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp b/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp index ade3eb584d..4ca40ef045 100644 --- a/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp +++ b/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp @@ -135,8 +135,8 @@ bool CBC_PDF417ErrorCorrection::generateErrorCorrection( const WideString& dataCodewords, int32_t errorCorrectionLevel, WideString* result) { - assert(result); - assert(result->IsEmpty()); + ASSERT(result); + ASSERT(result->IsEmpty()); int32_t k = getErrorCorrectionCodewordCount(errorCorrectionLevel); if (k < 0) diff --git a/xfa/fxfa/parser/cxfa_nodeowner.cpp b/xfa/fxfa/parser/cxfa_nodeowner.cpp index ae6f589616..13c969c10b 100644 --- a/xfa/fxfa/parser/cxfa_nodeowner.cpp +++ b/xfa/fxfa/parser/cxfa_nodeowner.cpp @@ -30,6 +30,6 @@ void CXFA_NodeOwner::FreeOwnedNode(CXFA_Node* node) { pdfium::FakeUniquePtr<CXFA_Node> search(node); auto it = nodes_.find(search); - assert(it != nodes_.end()); + ASSERT(it != nodes_.end()); nodes_.erase(it); } |