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/fxcrt/fx_basic_wstring.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fxcrt/fx_basic_wstring.cpp') diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp index 38fd15e13f..354bb5014a 100644 --- a/core/fxcrt/fx_basic_wstring.cpp +++ b/core/fxcrt/fx_basic_wstring.cpp @@ -230,7 +230,7 @@ void CFX_WideString::ReleaseBuffer(FX_STRSIZE nNewLength) { return; } - FXSYS_assert(m_pData->m_nRefs == 1); + ASSERT(m_pData->m_nRefs == 1); m_pData->m_nDataLength = nNewLength; m_pData->m_String[nNewLength] = 0; if (m_pData->m_nAllocLength - nNewLength >= 32) { @@ -968,7 +968,7 @@ FX_FLOAT CFX_WideString::GetFloat() const { // static CFX_ByteString CFX_CharMap::GetByteString(uint16_t codepage, const CFX_WideStringC& wstr) { - FXSYS_assert(IsValidCodePage(codepage)); + ASSERT(IsValidCodePage(codepage)); int src_len = wstr.GetLength(); int dest_len = FXSYS_WideCharToMultiByte(codepage, 0, wstr.c_str(), src_len, nullptr, 0, nullptr, nullptr); @@ -985,7 +985,7 @@ CFX_ByteString CFX_CharMap::GetByteString(uint16_t codepage, // static CFX_WideString CFX_CharMap::GetWideString(uint16_t codepage, const CFX_ByteStringC& bstr) { - FXSYS_assert(IsValidCodePage(codepage)); + ASSERT(IsValidCodePage(codepage)); int src_len = bstr.GetLength(); int dest_len = FXSYS_MultiByteToWideChar(codepage, 0, bstr.c_str(), src_len, nullptr, 0); -- cgit v1.2.3