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

Unified Diff: core/fpdfapi/font/font_int.h

Issue 2641853004: use unique_ptr in fpdf_font_cid.cpp (Closed)
Patch Set: iwyu, maybe owned Created 3 years, 11 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
Index: core/fpdfapi/font/font_int.h
diff --git a/core/fpdfapi/font/font_int.h b/core/fpdfapi/font/font_int.h
index 2410741e539e54b62b55d316f5668c96f7a2a341..41d821ec81fa6ff04d0436d3a957aa825978f42b 100644
--- a/core/fpdfapi/font/font_int.h
+++ b/core/fpdfapi/font/font_int.h
@@ -12,6 +12,7 @@
#include <vector>
#include "core/fpdfapi/font/cpdf_cidfont.h"
+#include "core/fxcrt/cfx_maybe_owned.h"
#include "core/fxcrt/fx_basic.h"
class CPDF_CID2UnicodeMap;
@@ -30,15 +31,18 @@ class CPDF_CMapManager {
CPDF_CMapManager();
~CPDF_CMapManager();
- CPDF_CMap* GetPredefinedCMap(const CFX_ByteString& name, bool bPromptCJK);
+ CFX_MaybeOwned<CPDF_CMap> GetPredefinedCMap(const CFX_ByteString& name,
+ bool bPromptCJK);
CPDF_CID2UnicodeMap* GetCID2UnicodeMap(CIDSet charset, bool bPromptCJK);
private:
- CPDF_CMap* LoadPredefinedCMap(const CFX_ByteString& name, bool bPromptCJK);
- CPDF_CID2UnicodeMap* LoadCID2UnicodeMap(CIDSet charset, bool bPromptCJK);
+ std::unique_ptr<CPDF_CMap> LoadPredefinedCMap(const CFX_ByteString& name,
+ bool bPromptCJK);
+ std::unique_ptr<CPDF_CID2UnicodeMap> LoadCID2UnicodeMap(CIDSet charset,
+ bool bPromptCJK);
- std::map<CFX_ByteString, CPDF_CMap*> m_CMaps;
- CPDF_CID2UnicodeMap* m_CID2UnicodeMaps[6];
+ std::map<CFX_ByteString, std::unique_ptr<CPDF_CMap>> m_CMaps;
+ std::unique_ptr<CPDF_CID2UnicodeMap> m_CID2UnicodeMaps[6];
};
class CFX_StockFontArray {

Powered by Google App Engine
This is Rietveld 408576698