Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1323)

Unified Diff: core/src/fxge/ge/fx_ge_fontmap.cpp

Issue 1081443004: Remove checks in fxge/ge now that FX_NEW can't return 0. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix Typo. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxge/ge/fx_ge_font.cpp ('k') | core/src/fxge/ge/fx_ge_linux.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/ge/fx_ge_fontmap.cpp
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 079c485b0194449e5634a34ef5cf0c5b4d6d5ac5..43b971ffc37db19aeb3f7e06c382b73efa4546f8 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;
« no previous file with comments | « core/src/fxge/ge/fx_ge_font.cpp ('k') | core/src/fxge/ge/fx_ge_linux.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698