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

Unified Diff: core/src/fxge/ge/fx_ge_font.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.cpp ('k') | core/src/fxge/ge/fx_ge_fontmap.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_font.cpp
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp
index ea59a481859bd11c00371808bbf0a3ca783e6c58..104a23998db4561cf3b73af245ec1b090c5c0bbe 100644
--- a/core/src/fxge/ge/fx_ge_font.cpp
+++ b/core/src/fxge/ge/fx_ge_font.cpp
@@ -68,10 +68,7 @@ FX_BOOL CFX_Font::LoadSubst(const CFX_ByteString& face_name, FX_BOOL bTrueType,
{
m_bEmbedded = FALSE;
m_bVertical = bVertical;
- m_pSubstFont = FX_NEW CFX_SubstFont;
- if (!m_pSubstFont) {
- return FALSE;
- }
+ m_pSubstFont = new CFX_SubstFont;
m_Face = CFX_GEModule::Get()->GetFontMgr()->FindSubstFont(face_name, bTrueType, flags, weight, italic_angle,
CharsetCP, m_pSubstFont);
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
@@ -442,7 +439,5 @@ FX_DWORD CFX_UnicodeEncoding::GlyphFromCharCodeEx(FX_DWORD charcode, int encodin
}
IFX_FontEncoding* FXGE_CreateUnicodeEncoding(CFX_Font* pFont)
{
- CFX_UnicodeEncoding* pEncoding = NULL;
- pEncoding = FX_NEW CFX_UnicodeEncoding(pFont);
- return pEncoding;
+ return new CFX_UnicodeEncoding(pFont);
}
« no previous file with comments | « core/src/fxge/ge/fx_ge.cpp ('k') | core/src/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698