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

Unified Diff: xfa/fgas/font/fgas_gefont.h

Issue 2207093005: Use smart pointers for class owned pointers (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: one more change Created 4 years, 4 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 | « no previous file | xfa/fgas/font/fgas_gefont.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/font/fgas_gefont.h
diff --git a/xfa/fgas/font/fgas_gefont.h b/xfa/fgas/font/fgas_gefont.h
index a94583fa6595a6474f389260b023638ff524cafe..37aa03eda9c5f9cd627695aee491fda41ebd77f7 100644
--- a/xfa/fgas/font/fgas_gefont.h
+++ b/xfa/fgas/font/fgas_gefont.h
@@ -9,6 +9,7 @@
#include <map>
+#include "core/fxcrt/include/fx_memory.h"
#include "xfa/fgas/crt/fgas_utils.h"
#include "xfa/fgas/font/fgas_font.h"
@@ -92,16 +93,16 @@ class CFGAS_GEFont {
uint32_t m_dwLogFontStyle;
#endif
CFX_Font* m_pFont;
- IFGAS_FontMgr* m_pFontMgr;
+ IFGAS_FontMgr* const m_pFontMgr;
int32_t m_iRefCount;
FX_BOOL m_bExtFont;
- IFX_Stream* m_pStream;
- IFX_FileRead* m_pFileRead;
- CFX_UnicodeEncoding* m_pFontEncoding;
- CFX_DiscreteArrayTemplate<uint16_t>* m_pCharWidthMap;
- CFX_MassArrayTemplate<CFX_Rect>* m_pRectArray;
- CFX_MapPtrToPtr* m_pBBoxMap;
- CXFA_PDFFontMgr* m_pProvider;
+ std::unique_ptr<IFX_Stream, ReleaseDeleter<IFX_Stream>> m_pStream;
+ std::unique_ptr<IFX_FileRead, ReleaseDeleter<IFX_FileRead>> m_pFileRead;
+ std::unique_ptr<CFX_UnicodeEncoding> m_pFontEncoding;
+ std::unique_ptr<CFX_DiscreteArrayTemplate<uint16_t>> m_pCharWidthMap;
+ std::unique_ptr<CFX_MassArrayTemplate<CFX_Rect>> m_pRectArray;
+ std::unique_ptr<CFX_MapPtrToPtr> m_pBBoxMap;
+ CXFA_PDFFontMgr* m_pProvider; // not owned.
CFX_ArrayTemplate<CFGAS_GEFont*> m_SubstFonts;
std::map<FX_WCHAR, CFGAS_GEFont*> m_FontMapper;
};
« no previous file with comments | « no previous file | xfa/fgas/font/fgas_gefont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698