summaryrefslogtreecommitdiff
path: root/xfa/fgas/font/fgas_stdfontmgr.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/fgas/font/fgas_stdfontmgr.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/fgas/font/fgas_stdfontmgr.cpp')
-rw-r--r--xfa/fgas/font/fgas_stdfontmgr.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index 4b2a1422d2..dedc8b0ad2 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -63,7 +63,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByCodePage(
return NULL;
}
}
- FXSYS_assert(pFD != NULL);
+ ASSERT(pFD != NULL);
pFont = IFX_Font::LoadFont(pFD->wsFontFace, dwFontStyles, wCodePage, this);
if (pFont != NULL) {
m_Fonts.Add(pFont);
@@ -144,7 +144,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily,
return NULL;
}
}
- FXSYS_assert(pFD != NULL);
+ ASSERT(pFD != NULL);
if (wCodePage == 0xFFFF) {
wCodePage = FX_GetCodePageFromCharset(pFD->uCharSet);
}
@@ -159,7 +159,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily,
return NULL;
}
IFX_Font* CFX_StdFontMgrImp::LoadFont(const uint8_t* pBuffer, int32_t iLength) {
- FXSYS_assert(pBuffer != NULL && iLength > 0);
+ ASSERT(pBuffer != NULL && iLength > 0);
IFX_Font* pFont = NULL;
if (m_BufferFonts.Lookup((void*)pBuffer, (void*&)pFont)) {
if (pFont != NULL) {
@@ -175,7 +175,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const uint8_t* pBuffer, int32_t iLength) {
return NULL;
}
IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName) {
- FXSYS_assert(pszFileName != NULL);
+ ASSERT(pszFileName != NULL);
uint32_t dwHash = FX_HashCode_GetW(pszFileName, false);
IFX_Font* pFont = NULL;
if (m_FileFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont)) {
@@ -196,7 +196,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream,
uint32_t dwFontStyles,
uint16_t wCodePage,
FX_BOOL bSaveStream) {
- FXSYS_assert(pFontStream != NULL && pFontStream->GetLength() > 0);
+ ASSERT(pFontStream != NULL && pFontStream->GetLength() > 0);
IFX_Font* pFont = NULL;
if (m_StreamFonts.Lookup((void*)pFontStream, (void*&)pFont)) {
if (pFont != NULL) {
@@ -224,7 +224,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream,
IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Font* pSrcFont,
uint32_t dwFontStyles,
uint16_t wCodePage) {
- FXSYS_assert(pSrcFont != NULL);
+ ASSERT(pSrcFont != NULL);
if (pSrcFont->GetFontStyles() == dwFontStyles) {
return pSrcFont->Retain();
}
@@ -1191,7 +1191,7 @@ int32_t CFX_FontMgrImp::CalcPenalty(CFX_FontDescriptor* pInstalled,
((0 == wCodePage || 0xFFFF == wCodePage) ? (uint16_t)-1
: FX_GetCodePageBit(wCodePage));
if (wBit != (uint16_t)-1) {
- FXSYS_assert(wBit < 64);
+ ASSERT(wBit < 64);
if (0 == (pInstalled->m_dwCsb[wBit / 32] & (1 << (wBit % 32)))) {
nPenalty += 0xFFFF;
} else {
@@ -1202,7 +1202,7 @@ int32_t CFX_FontMgrImp::CalcPenalty(CFX_FontDescriptor* pInstalled,
((0 == wcUnicode || 0xFFFE == wcUnicode) ? (uint16_t)999
: FX_GetUnicodeBit(wcUnicode));
if (wBit != (uint16_t)999) {
- FXSYS_assert(wBit < 128);
+ ASSERT(wBit < 128);
if (0 == (pInstalled->m_dwUsb[wBit / 32] & (1 << (wBit % 32)))) {
nPenalty += 0xFFFF;
} else {