summaryrefslogtreecommitdiff
path: root/xfa/fde/css/fde_csssyntax.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/fde/css/fde_csssyntax.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/fde/css/fde_csssyntax.cpp')
-rw-r--r--xfa/fde/css/fde_csssyntax.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fde/css/fde_csssyntax.cpp b/xfa/fde/css/fde_csssyntax.cpp
index 8a905f69b4..4cc890c96b 100644
--- a/xfa/fde/css/fde_csssyntax.cpp
+++ b/xfa/fde/css/fde_csssyntax.cpp
@@ -41,7 +41,7 @@ FX_BOOL CFDE_CSSSyntaxParser::Init(IFX_Stream* pStream,
int32_t iCSSPlaneSize,
int32_t iTextDataSize,
FX_BOOL bOnlyDeclaration) {
- FXSYS_assert(pStream != NULL && iCSSPlaneSize > 0 && iTextDataSize > 0);
+ ASSERT(pStream != NULL && iCSSPlaneSize > 0 && iTextDataSize > 0);
Reset(bOnlyDeclaration);
if (!m_TextData.EstimateSize(iTextDataSize)) {
return FALSE;
@@ -56,7 +56,7 @@ FX_BOOL CFDE_CSSSyntaxParser::Init(const FX_WCHAR* pBuffer,
int32_t iBufferSize,
int32_t iTextDatSize,
FX_BOOL bOnlyDeclaration) {
- FXSYS_assert(pBuffer != NULL && iBufferSize > 0 && iTextDatSize > 0);
+ ASSERT(pBuffer != NULL && iBufferSize > 0 && iTextDatSize > 0);
Reset(bOnlyDeclaration);
if (!m_TextData.EstimateSize(iTextDatSize)) {
return FALSE;
@@ -358,7 +358,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSSyntaxParser::DoSyntaxParse() {
m_TextPlane.MoveNext();
break;
default:
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
break;
}
}
@@ -434,7 +434,7 @@ FX_BOOL CFDE_CSSTextBuf::AttachBuffer(const FX_WCHAR* pBuffer,
return m_bExtBuf = TRUE;
}
FX_BOOL CFDE_CSSTextBuf::EstimateSize(int32_t iAllocSize) {
- FXSYS_assert(iAllocSize > 0);
+ ASSERT(iAllocSize > 0);
Clear();
m_bExtBuf = FALSE;
return ExpandBuf(iAllocSize);
@@ -443,7 +443,7 @@ int32_t CFDE_CSSTextBuf::LoadFromStream(IFX_Stream* pTxtStream,
int32_t iStreamOffset,
int32_t iMaxChars,
FX_BOOL& bEOS) {
- FXSYS_assert(iStreamOffset >= 0 && iMaxChars > 0);
+ ASSERT(iStreamOffset >= 0 && iMaxChars > 0);
Clear();
m_bExtBuf = FALSE;
if (!ExpandBuf(iMaxChars)) {
@@ -474,7 +474,7 @@ FX_BOOL CFDE_CSSTextBuf::ExpandBuf(int32_t iDesiredSize) {
return TRUE;
}
void CFDE_CSSTextBuf::Subtract(int32_t iStart, int32_t iLength) {
- FXSYS_assert(iStart >= 0 && iLength > 0);
+ ASSERT(iStart >= 0 && iLength > 0);
if (iLength > m_iDatLen - iStart) {
iLength = m_iDatLen - iStart;
}