summaryrefslogtreecommitdiff
path: root/xfa/fee/fx_wordbreak/fx_wordbreak_impl.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/fee/fx_wordbreak/fx_wordbreak_impl.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/fee/fx_wordbreak/fx_wordbreak_impl.cpp')
-rw-r--r--xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp b/xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp
index e77c5f14bf..408558a9ca 100644
--- a/xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp
+++ b/xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp
@@ -14,7 +14,7 @@ FX_WordBreakProp FX_GetWordBreakProperty(FX_WCHAR wcCodePoint) {
}
CFX_CharIter::CFX_CharIter(const CFX_WideString& wsText)
: m_wsText(wsText), m_nIndex(0) {
- FXSYS_assert(!wsText.IsEmpty());
+ ASSERT(!wsText.IsEmpty());
}
CFX_CharIter::~CFX_CharIter() {}
void CFX_CharIter::Release() {
@@ -69,7 +69,7 @@ void CFX_WordBreak::Release() {
delete this;
}
void CFX_WordBreak::Attach(IFX_CharIter* pIter) {
- FXSYS_assert(pIter);
+ ASSERT(pIter);
m_pCurIter = pIter;
}
void CFX_WordBreak::Attach(const CFX_WideString& wsText) {
@@ -183,7 +183,7 @@ FX_BOOL CFX_WordBreak::FindNextBreakPos(IFX_CharIter* pIter,
}
}
if (nFlags > 0) {
- FXSYS_assert(nFlags <= 2);
+ ASSERT(nFlags <= 2);
if (!((nFlags == 1 && ePreType == FX_WordBreakProp_ALetter) ||
(nFlags == 2 && ePreType == FX_WordBreakProp_Numberic))) {
pIter->Next(!bPrev);
@@ -215,7 +215,7 @@ FX_BOOL CFX_WordBreak::FindNextBreakPos(IFX_CharIter* pIter,
pIter->Next(!bPrev);
return TRUE;
}
- FXSYS_assert(nFlags <= 2);
+ ASSERT(nFlags <= 2);
pIter->Next(bPrev);
wcTemp = pIter->GetChar();
eNextType = (FX_WordBreakProp)FX_GetWordBreakProperty(wcTemp);