From 43854a5073602a4613131aa6dbac5f7b9a095bcd Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 27 Apr 2016 12:26:00 -0700 Subject: 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 --- xfa/fgas/font/fgas_gefont.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'xfa/fgas/font/fgas_gefont.cpp') diff --git a/xfa/fgas/font/fgas_gefont.cpp b/xfa/fgas/font/fgas_gefont.cpp index ed41076535..7bf877f8c2 100644 --- a/xfa/fgas/font/fgas_gefont.cpp +++ b/xfa/fgas/font/fgas_gefont.cpp @@ -130,8 +130,8 @@ CFX_GEFont::CFX_GEFont(const CFX_GEFont& src, uint32_t dwFontStyles) m_SubstFonts(), m_FontMapper(16) { m_pFont = new CFX_Font; - FXSYS_assert(m_pFont != NULL); - FXSYS_assert(src.m_pFont != NULL); + ASSERT(m_pFont != NULL); + ASSERT(src.m_pFont != NULL); m_pFont->LoadClone(src.m_pFont); CFX_SubstFont* pSubst = m_pFont->GetSubstFont(); if (!pSubst) { @@ -357,7 +357,7 @@ void CFX_GEFont::GetPsName(CFX_WideString& wsName) const { wsName = m_pFont->GetPsName(); } uint32_t CFX_GEFont::GetFontStyles() const { - FXSYS_assert(m_pFont != NULL); + ASSERT(m_pFont != NULL); #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ if (m_bUseLogFontStyle) { return m_dwLogFontStyle; @@ -390,7 +390,7 @@ FX_BOOL CFX_GEFont::GetCharWidth(FX_WCHAR wUnicode, int32_t& iWidth, FX_BOOL bRecursive, FX_BOOL bCharCode) { - FXSYS_assert(m_pCharWidthMap != NULL); + ASSERT(m_pCharWidthMap != NULL); iWidth = m_pCharWidthMap->GetAt(wUnicode, 0); if (iWidth < 1) { if (!m_pProvider || @@ -426,8 +426,8 @@ FX_BOOL CFX_GEFont::GetCharBBox(FX_WCHAR wUnicode, CFX_Rect& bbox, FX_BOOL bRecursive, FX_BOOL bCharCode) { - FXSYS_assert(m_pRectArray != NULL); - FXSYS_assert(m_pBBoxMap != NULL); + ASSERT(m_pRectArray != NULL); + ASSERT(m_pBBoxMap != NULL); void* pRect = NULL; if (!m_pBBoxMap->Lookup((void*)(uintptr_t)wUnicode, pRect)) { IFX_Font* pFont = NULL; @@ -478,7 +478,7 @@ int32_t CFX_GEFont::GetGlyphIndex(FX_WCHAR wUnicode, FX_BOOL bRecursive, IFX_Font** ppFont, FX_BOOL bCharCode) { - FXSYS_assert(m_pFontEncoding != NULL); + ASSERT(m_pFontEncoding != NULL); int32_t iGlyphIndex = m_pFontEncoding->GlyphFromCharCode(wUnicode); if (iGlyphIndex > 0) { if (ppFont != NULL) { -- cgit v1.2.3