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

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

Issue 2364643003: Make CPDF_Font::Create() return a std::unique_ptr. (Closed)
Patch Set: Stray file Created 4 years, 3 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 | « core/fpdfapi/fpdf_font/cpdf_font.cpp ('k') | core/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « core/fpdfapi/fpdf_font/cpdf_font.cpp ('k') | core/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698