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 --- xfa/fgas/crt/fgas_algorithm.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xfa/fgas/crt/fgas_algorithm.cpp') diff --git a/xfa/fgas/crt/fgas_algorithm.cpp b/xfa/fgas/crt/fgas_algorithm.cpp index ce8dda646a..ee557b10d9 100644 --- a/xfa/fgas/crt/fgas_algorithm.cpp +++ b/xfa/fgas/crt/fgas_algorithm.cpp @@ -55,7 +55,7 @@ static void FX_Base64EncodePiece(const FX_BASE64DATA& src, } } int32_t FX_Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst) { - FXSYS_assert(pSrc != NULL); + ASSERT(pSrc != NULL); if (iSrcLen < 1) { return 0; } @@ -118,7 +118,7 @@ static void FX_Base64DecodePiece(const FX_CHAR src[4], int32_t iChars, FX_BASE64DATA& dst, int32_t& iBytes) { - FXSYS_assert(iChars > 0 && iChars < 5); + ASSERT(iChars > 0 && iChars < 5); iBytes = 1; dst.data2 = g_FXBase64DecoderMap[(uint8_t)src[0]]; if (iChars > 1) { @@ -144,7 +144,7 @@ static void FX_Base64DecodePiece(const FX_CHAR src[4], } } int32_t FX_Base64DecodeA(const FX_CHAR* pSrc, int32_t iSrcLen, uint8_t* pDst) { - FXSYS_assert(pSrc != NULL); + ASSERT(pSrc != NULL); if (iSrcLen < 1) { return 0; } @@ -200,7 +200,7 @@ int32_t FX_Base64DecodeA(const FX_CHAR* pSrc, int32_t iSrcLen, uint8_t* pDst) { return pDstEnd - pDst; } int32_t FX_Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* pDst) { - FXSYS_assert(pSrc != NULL); + ASSERT(pSrc != NULL); if (iSrcLen < 1) { return 0; } -- cgit v1.2.3