summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_localevalue.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 /xfa/fxfa/parser/xfa_localevalue.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 'xfa/fxfa/parser/xfa_localevalue.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_localevalue.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp
index 2c018ea72d..7530d80f5a 100644
--- a/xfa/fxfa/parser/xfa_localevalue.cpp
+++ b/xfa/fxfa/parser/xfa_localevalue.cpp
@@ -371,7 +371,7 @@ CFX_Unitime CXFA_LocaleValue::GetDate() const {
CFX_Unitime CXFA_LocaleValue::GetTime() const {
if (m_bValid && m_dwType == XFA_VT_TIME) {
CFX_Unitime dt(0);
- FXSYS_assert(m_pLocaleMgr);
+ ASSERT(m_pLocaleMgr);
FX_TimeFromCanonical(m_wsValue.AsStringC(), dt,
m_pLocaleMgr->GetDefLocale());
return dt;
@@ -383,7 +383,7 @@ CFX_Unitime CXFA_LocaleValue::GetDateTime() const {
int32_t index = m_wsValue.Find('T');
CFX_Unitime dt;
FX_DateFromCanonical(m_wsValue.Left(index), dt);
- FXSYS_assert(m_pLocaleMgr);
+ ASSERT(m_pLocaleMgr);
FX_TimeFromCanonical(
m_wsValue.Right(m_wsValue.GetLength() - index - 1).AsStringC(), dt,
m_pLocaleMgr->GetDefLocale());
@@ -890,8 +890,8 @@ void CXFA_LocaleValue::GetNumbericFormat(CFX_WideString& wsFormat,
int32_t nIntLen,
int32_t nDecLen,
FX_BOOL bSign) {
- FXSYS_assert(wsFormat.IsEmpty());
- FXSYS_assert(nIntLen >= -1 && nDecLen >= -1);
+ ASSERT(wsFormat.IsEmpty());
+ ASSERT(nIntLen >= -1 && nDecLen >= -1);
int32_t nTotalLen = (nIntLen >= 0 ? nIntLen : 2) + (bSign ? 1 : 0) +
(nDecLen >= 0 ? nDecLen : 2) + (nDecLen == 0 ? 0 : 1);
FX_WCHAR* lpBuf = wsFormat.GetBuffer(nTotalLen);
@@ -963,7 +963,7 @@ FX_BOOL CXFA_LocaleValue::ValidateNumericTemp(CFX_WideString& wsNumeric,
return FALSE;
}
while (nf < nCountFmt && (cf = pFmt[nf]) != L'.') {
- FXSYS_assert(cf == L'z' || cf == L'*');
+ ASSERT(cf == L'z' || cf == L'*');
++nf;
}
CFX_WideString wsDecimalSymbol;