summaryrefslogtreecommitdiff
path: root/xfa/fde/css/fde_cssdatatable.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/fde/css/fde_cssdatatable.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/fde/css/fde_cssdatatable.h')
-rw-r--r--xfa/fde/css/fde_cssdatatable.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/xfa/fde/css/fde_cssdatatable.h b/xfa/fde/css/fde_cssdatatable.h
index a066c29f94..dda04c4691 100644
--- a/xfa/fde/css/fde_cssdatatable.h
+++ b/xfa/fde/css/fde_cssdatatable.h
@@ -15,7 +15,7 @@ class CFDE_CSSFunction : public CFX_Target {
public:
CFDE_CSSFunction(const FX_WCHAR* pszFuncName, IFDE_CSSValueList* pArgList)
: m_pArgList(pArgList), m_pszFuncName(pszFuncName) {
- FXSYS_assert(pArgList != NULL);
+ ASSERT(pArgList != NULL);
}
int32_t CountArgs() const { return m_pArgList->CountValues(); }
IFDE_CSSValue* GetArgs(int32_t index) const {
@@ -39,7 +39,7 @@ class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue,
: m_eType(eType), m_fNumber(fValue) {}
CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType, const FX_WCHAR* pValue)
: m_eType(eType), m_pString(pValue) {
- FXSYS_assert(m_pString != NULL);
+ ASSERT(m_pString != NULL);
}
CFDE_CSSPrimitiveValue(CFDE_CSSFunction* pFunction)
: m_eType(FDE_CSSPRIMITIVETYPE_Function), m_pFunction(pFunction) {}
@@ -47,34 +47,34 @@ class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue,
virtual FDE_CSSPRIMITIVETYPE GetPrimitiveType() const { return m_eType; }
virtual FX_ARGB GetRGBColor() const {
- FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_RGB);
+ ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_RGB);
return m_dwColor;
}
virtual FX_FLOAT GetFloat() const {
- FXSYS_assert(m_eType >= FDE_CSSPRIMITIVETYPE_Number &&
- m_eType <= FDE_CSSPRIMITIVETYPE_PC);
+ ASSERT(m_eType >= FDE_CSSPRIMITIVETYPE_Number &&
+ m_eType <= FDE_CSSPRIMITIVETYPE_PC);
return m_fNumber;
}
virtual const FX_WCHAR* GetString(int32_t& iLength) const {
- FXSYS_assert(m_eType >= FDE_CSSPRIMITIVETYPE_String &&
- m_eType <= FDE_CSSPRIMITIVETYPE_URI);
+ ASSERT(m_eType >= FDE_CSSPRIMITIVETYPE_String &&
+ m_eType <= FDE_CSSPRIMITIVETYPE_URI);
iLength = FXSYS_wcslen(m_pString);
return m_pString;
}
virtual FDE_CSSPROPERTYVALUE GetEnum() const {
- FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Enum);
+ ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Enum);
return m_eEnum;
}
virtual const FX_WCHAR* GetFuncName() const {
- FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Function);
+ ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function);
return m_pFunction->GetFuncName();
}
virtual int32_t CountArgs() const {
- FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Function);
+ ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function);
return m_pFunction->CountArgs();
}
virtual IFDE_CSSValue* GetArgs(int32_t index) const {
- FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Function);
+ ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function);
return m_pFunction->GetArgs(index);
}
@@ -106,7 +106,7 @@ class CFDE_CSSValueListParser : public CFX_Target {
public:
CFDE_CSSValueListParser(const FX_WCHAR* psz, int32_t iLen, FX_WCHAR separator)
: m_Separator(separator), m_pCur(psz), m_pEnd(psz + iLen) {
- FXSYS_assert(psz != NULL && iLen > 0);
+ ASSERT(psz != NULL && iLen > 0);
}
FX_BOOL NextValue(FDE_CSSPRIMITIVETYPE& eType,
const FX_WCHAR*& pStart,