From 43854a5073602a4613131aa6dbac5f7b9a095bcd Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 27 Apr 2016 12:26:00 -0700 Subject: Standardize on ASSERT. There are currently three ways to assert in the code (ASSERT, FXSYS_assert and assert). This CL standardizes on ASSERT. The benefit of ASSERT is that it can be overridden if the platform requies and we can pickup the Chromium version if it has already been defined in the build. This does change behaviour. Currently FXSYS_assert is always defined but ASSERT is only defined in debug builds. So, the FXSYS_assert's would fire in Release builds. That will no longer happen. BUG=pdfium:219 Review-Url: https://codereview.chromium.org/1914303003 --- core/fpdfapi/fpdf_parser/cpdf_document.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi/fpdf_parser') diff --git a/core/fpdfapi/fpdf_parser/cpdf_document.cpp b/core/fpdfapi/fpdf_parser/cpdf_document.cpp index ead1ac0455..39694c1c1a 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_document.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_document.cpp @@ -238,7 +238,7 @@ const FX_LANG2CS gs_FXLang2CharsetTable[] = { }; uint32_t FX_GetLangHashCode(const FX_CHAR* pStr) { - FXSYS_assert(pStr); + ASSERT(pStr); int32_t iLength = FXSYS_strlen(pStr); const FX_CHAR* pStrEnd = pStr + iLength; uint32_t uHashCode = 0; @@ -265,7 +265,7 @@ uint8_t FX_GetCsFromLangCode(uint32_t uCode) { } uint8_t FX_GetCharsetFromLang(const FX_CHAR* pLang, int32_t iLength) { - FXSYS_assert(pLang); + ASSERT(pLang); if (iLength < 0) iLength = FXSYS_strlen(pLang); @@ -765,7 +765,7 @@ CPDF_Image* CPDF_Document::LoadImageF(CPDF_Object* pObj) { if (!pObj) return nullptr; - FXSYS_assert(pObj->GetObjNum()); + ASSERT(pObj->GetObjNum()); return m_pDocPage->GetImage(pObj); } -- cgit v1.2.3