Index: core/fpdfapi/fpdf_font/font_int.h |
diff --git a/core/fpdfapi/fpdf_font/font_int.h b/core/fpdfapi/fpdf_font/font_int.h |
index 512fb6c47495284b7b75860efaa1ee87e9b976a4..bcadc8d8266393611bc07534d747c6ec7408b5dc 100644 |
--- a/core/fpdfapi/fpdf_font/font_int.h |
+++ b/core/fpdfapi/fpdf_font/font_int.h |
@@ -46,8 +46,8 @@ class CFX_StockFontArray { |
CFX_StockFontArray(); |
~CFX_StockFontArray(); |
- // Takes ownership of |pFont|. |
- void SetFont(uint32_t index, CPDF_Font* pFont); |
+ // Takes ownership of |pFont|, returns unowned pointer to it. |
+ CPDF_Font* SetFont(uint32_t index, std::unique_ptr<CPDF_Font> pFont); |
CPDF_Font* GetFont(uint32_t index) const; |
private: |
@@ -62,8 +62,10 @@ class CPDF_FontGlobals { |
void Clear(CPDF_Document* pDoc); |
CPDF_Font* Find(CPDF_Document* pDoc, uint32_t index); |
- // Takes ownership of |pFont|. |
- void Set(CPDF_Document* key, uint32_t index, CPDF_Font* pFont); |
+ // Takes ownership of |pFont|, returns unowned pointer to it. |
+ CPDF_Font* Set(CPDF_Document* key, |
+ uint32_t index, |
+ std::unique_ptr<CPDF_Font> pFont); |
CPDF_CMapManager m_CMapManager; |
struct { |