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_font.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_font.cpp')
-rw-r--r-- | core/src/fxge/ge/fx_ge_font.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp index ea59a48185..104a23998d 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); } |