diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-04-16 08:31:30 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-04-16 08:31:30 -0700 |
commit | 026623249c78ba305c874cc093a035ef5a4cd1b4 (patch) | |
tree | 5540055c26b89a0747b0ebe2193732e82d5872a7 /core/src/fxge/ge/fx_ge_fontmap.cpp | |
parent | 6c0d01b0244af7d8f9a896e626c7a7d5476a7373 (diff) | |
download | pdfium-026623249c78ba305c874cc093a035ef5a4cd1b4.tar.xz |
Remove checks in fxge/ge now that FX_NEW can't return 0.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1081443004
Diffstat (limited to 'core/src/fxge/ge/fx_ge_fontmap.cpp')
-rw-r--r-- | core/src/fxge/ge/fx_ge_fontmap.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp index 079c485b01..43b971ffc3 100644 --- a/core/src/fxge/ge/fx_ge_fontmap.cpp +++ b/core/src/fxge/ge/fx_ge_fontmap.cpp @@ -61,10 +61,7 @@ FX_BOOL CTTFontDesc::ReleaseFace(FXFT_Face face) } CFX_FontMgr::CFX_FontMgr() { - m_pBuiltinMapper = FX_NEW CFX_FontMapper; - if (!m_pBuiltinMapper) { - return; - } + m_pBuiltinMapper = new CFX_FontMapper; m_pBuiltinMapper->m_pFontMgr = this; m_pExtMapper = NULL; m_FTLibrary = NULL; @@ -136,10 +133,7 @@ FXFT_Face CFX_FontMgr::GetCachedFace(const CFX_ByteString& face_name, FXFT_Face CFX_FontMgr::AddCachedFace(const CFX_ByteString& face_name, int weight, FX_BOOL bItalic, FX_LPBYTE pData, FX_DWORD size, int face_index) { - CTTFontDesc* pFontDesc = FX_NEW CTTFontDesc; - if (!pFontDesc) { - return NULL; - } + CTTFontDesc* pFontDesc = new CTTFontDesc; pFontDesc->m_Type = 1; pFontDesc->m_SingleFace.m_pFace = NULL; pFontDesc->m_SingleFace.m_bBold = weight; @@ -337,10 +331,7 @@ FXFT_Face CFX_FontMgr::AddCachedTTCFace(int ttc_size, FX_DWORD checksum, { CFX_ByteString key; key.Format("%d:%d", ttc_size, checksum); - CTTFontDesc* pFontDesc = FX_NEW CTTFontDesc; - if (!pFontDesc) { - return NULL; - } + CTTFontDesc* pFontDesc = new CTTFontDesc; pFontDesc->m_Type = 2; pFontDesc->m_pFontData = pData; for (int i = 0; i < 16; i ++) { @@ -1416,10 +1407,7 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path, FXSYS_FILE* pFile, FX_ if (m_FontList.Lookup(facename, p)) { return; } - CFontFaceInfo* pInfo = FX_NEW CFontFaceInfo; - if (!pInfo) { - return; - } + CFontFaceInfo* pInfo = new CFontFaceInfo; pInfo->m_FilePath = path; pInfo->m_FaceName = facename; pInfo->m_FontTables = tables; |