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

Unified Diff: xfa/fgas/font/fgas_stdfontmgr.cpp

Issue 1930533002: More IFX_ interface cleanup. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 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 | « xfa/fgas/font/fgas_stdfontmgr.h ('k') | xfa/fgas/xml/fgas_sax.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/font/fgas_stdfontmgr.cpp
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index dedc8b0ad236fd1ba86d88b2b1b704593cd3dc72..a3964d2bb83ddd84bcc8d9eda8149e10eef93cbf 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -555,21 +555,19 @@ IFX_FileAccess* CFX_FontSourceEnum_File::GetNext(FX_POSITION& pos) {
pos = 0 != m_wsNext.GetLength() ? pAccess : NULL;
return (IFX_FileAccess*)pAccess;
}
-IFX_FontSourceEnum* FX_CreateDefaultFontSourceEnum() {
- return (IFX_FontSourceEnum*)new CFX_FontSourceEnum_File;
-}
-IFX_FontMgr* IFX_FontMgr::Create(IFX_FontSourceEnum* pFontEnum) {
- if (NULL == pFontEnum) {
- return NULL;
- }
+
+IFX_FontMgr* IFX_FontMgr::Create(CFX_FontSourceEnum_File* pFontEnum) {
+ if (!pFontEnum)
+ return nullptr;
+
CFX_FontMgrImp* pFontMgr = new CFX_FontMgrImp(pFontEnum);
- if (pFontMgr->EnumFonts()) {
+ if (pFontMgr->EnumFonts())
return pFontMgr;
- }
+
delete pFontMgr;
- return NULL;
+ return nullptr;
}
-CFX_FontMgrImp::CFX_FontMgrImp(IFX_FontSourceEnum* pFontEnum)
+CFX_FontMgrImp::CFX_FontMgrImp(CFX_FontSourceEnum_File* pFontEnum)
: m_pFontSource(pFontEnum) {}
FX_BOOL CFX_FontMgrImp::EnumFontsFromFontMapper() {
« no previous file with comments | « xfa/fgas/font/fgas_stdfontmgr.h ('k') | xfa/fgas/xml/fgas_sax.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698