diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-27 12:26:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-27 12:26:01 -0700 |
commit | 43854a5073602a4613131aa6dbac5f7b9a095bcd (patch) | |
tree | 653ebf0cd690e13d1ca9e315ffeb34f8ac85cfbb /xfa/fde/tto | |
parent | b2f6f9158f54cee1825830c7ed57fe9d89cff26e (diff) | |
download | pdfium-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/tto')
-rw-r--r-- | xfa/fde/tto/fde_textout.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp index a18fbbd0ae..fc97d99125 100644 --- a/xfa/fde/tto/fde_textout.cpp +++ b/xfa/fde/tto/fde_textout.cpp @@ -60,12 +60,12 @@ CFDE_TextOut::~CFDE_TextOut() { m_ttoLines.RemoveAll(); } void CFDE_TextOut::SetFont(IFX_Font* pFont) { - FXSYS_assert(pFont); + ASSERT(pFont); m_pFont = pFont; m_pTxtBreak->SetFont(pFont); } void CFDE_TextOut::SetFontSize(FX_FLOAT fFontSize) { - FXSYS_assert(fFontSize > 0); + ASSERT(fFontSize > 0); m_fFontSize = fFontSize; m_pTxtBreak->SetFontSize(fFontSize); } @@ -97,7 +97,7 @@ void CFDE_TextOut::SetStyles(uint32_t dwStyles) { m_pTxtBreak->SetLayoutStyles(m_dwTxtBkStyles); } void CFDE_TextOut::SetTabWidth(FX_FLOAT fTabWidth) { - FXSYS_assert(fTabWidth > 1.0f); + ASSERT(fTabWidth > 1.0f); m_pTxtBreak->SetTabWidth(fTabWidth, FALSE); } void CFDE_TextOut::SetEllipsisString(const CFX_WideString& wsEllipsis) { @@ -128,11 +128,11 @@ void CFDE_TextOut::SetAlignment(int32_t iAlignment) { m_pTxtBreak->SetAlignment(m_iTxtBkAlignment); } void CFDE_TextOut::SetLineSpace(FX_FLOAT fLineSpace) { - FXSYS_assert(fLineSpace > 1.0f); + ASSERT(fLineSpace > 1.0f); m_fLineSpace = fLineSpace; } void CFDE_TextOut::SetDIBitmap(CFX_DIBitmap* pDIB) { - FXSYS_assert(pDIB); + ASSERT(pDIB); if (m_pRenderDevice) m_pRenderDevice->Release(); @@ -143,7 +143,7 @@ void CFDE_TextOut::SetDIBitmap(CFX_DIBitmap* pDIB) { } void CFDE_TextOut::SetRenderDevice(CFX_RenderDevice* pDevice) { - FXSYS_assert(pDevice); + ASSERT(pDevice); if (m_pRenderDevice) m_pRenderDevice->Release(); @@ -235,7 +235,7 @@ void CFDE_TextOut::CalcLogicSize(const FX_WCHAR* pwsStr, void CFDE_TextOut::CalcTextSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF& rect) { - FXSYS_assert(m_pFont != NULL && m_fFontSize >= 1.0f); + ASSERT(m_pFont != NULL && m_fFontSize >= 1.0f); SetLineWidth(rect); m_iTotalLines = 0; const FX_WCHAR* pStr = pwsStr; @@ -397,7 +397,7 @@ void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF& rect, const CFX_RectF& rtClip) { - FXSYS_assert(m_pFont != NULL && m_fFontSize >= 1.0f); + ASSERT(m_pFont != NULL && m_fFontSize >= 1.0f); if (pwsStr == NULL || iLength < 1) { return; } |