summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_basic_wstring.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-27 12:26:00 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-27 12:26:01 -0700
commit43854a5073602a4613131aa6dbac5f7b9a095bcd (patch)
tree653ebf0cd690e13d1ca9e315ffeb34f8ac85cfbb /core/fxcrt/fx_basic_wstring.cpp
parentb2f6f9158f54cee1825830c7ed57fe9d89cff26e (diff)
downloadpdfium-43854a5073602a4613131aa6dbac5f7b9a095bcd.tar.xz
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
Diffstat (limited to 'core/fxcrt/fx_basic_wstring.cpp')
-rw-r--r--core/fxcrt/fx_basic_wstring.cpp6
1 files changed, 3 insertions, 3 deletions
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);