summaryrefslogtreecommitdiff
path: root/xfa/fgas/layout/fgas_textbreak.h
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/fgas/layout/fgas_textbreak.h
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/fgas/layout/fgas_textbreak.h')
-rw-r--r--xfa/fgas/layout/fgas_textbreak.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h
index af6d52163f..41bd8f4921 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -133,11 +133,11 @@ class CFX_TxtPiece : public CFX_Target {
int32_t GetLength() const { return m_iChars; }
int32_t GetEndChar() const { return m_iStartChar + m_iChars; }
CFX_TxtChar* GetCharPtr(int32_t index) const {
- FXSYS_assert(index > -1 && index < m_iChars && m_pChars != NULL);
+ ASSERT(index > -1 && index < m_iChars && m_pChars != NULL);
return m_pChars->GetDataPtr(m_iStartChar + index);
}
void GetString(FX_WCHAR* pText) const {
- FXSYS_assert(pText != NULL);
+ ASSERT(pText != NULL);
int32_t iEndChar = m_iStartChar + m_iChars;
CFX_Char* pChar;
for (int32_t i = m_iStartChar; i < iEndChar; i++) {
@@ -152,7 +152,7 @@ class CFX_TxtPiece : public CFX_Target {
wsText.ReleaseBuffer(m_iChars);
}
void GetWidths(int32_t* pWidths) const {
- FXSYS_assert(pWidths != NULL);
+ ASSERT(pWidths != NULL);
int32_t iEndChar = m_iStartChar + m_iChars;
CFX_Char* pChar;
for (int32_t i = m_iStartChar; i < iEndChar; i++) {
@@ -189,12 +189,12 @@ class CFX_TxtLine {
}
int32_t CountChars() const { return m_pLineChars->GetSize(); }
CFX_TxtChar* GetCharPtr(int32_t index) const {
- FXSYS_assert(index > -1 && index < m_pLineChars->GetSize());
+ ASSERT(index > -1 && index < m_pLineChars->GetSize());
return m_pLineChars->GetDataPtr(index);
}
int32_t CountPieces() const { return m_pLinePieces->GetSize(); }
CFX_TxtPiece* GetPiecePtr(int32_t index) const {
- FXSYS_assert(index > -1 && index < m_pLinePieces->GetSize());
+ ASSERT(index > -1 && index < m_pLinePieces->GetSize());
return m_pLinePieces->GetPtrAt(index);
}
void GetString(CFX_WideString& wsStr) const {