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

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

Issue 2169793002: Use smart pointers for CFX_Font and CFX_Type3Font classes (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 5 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/fde/fde_gedevice.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/font/fgas_gefont.cpp
diff --git a/xfa/fgas/font/fgas_gefont.cpp b/xfa/fgas/font/fgas_gefont.cpp
index 576f482df262f22884fc5ea83c2a3fa6cd55f11a..48635cabf7b324c5f018b8f9cd57521349305e28 100644
--- a/xfa/fgas/font/fgas_gefont.cpp
+++ b/xfa/fgas/font/fgas_gefont.cpp
@@ -109,7 +109,7 @@ CFGAS_GEFont::CFGAS_GEFont(const CFGAS_GEFont& src, uint32_t dwFontStyles)
CFX_SubstFont* pSubst = m_pFont->GetSubstFont();
if (!pSubst) {
pSubst = new CFX_SubstFont;
- m_pFont->SetSubstFont(pSubst);
+ m_pFont->SetSubstFont(std::unique_ptr<CFX_SubstFont>(pSubst));
}
pSubst->m_Weight =
(dwFontStyles & FX_FONTSTYLE_Bold) ? FXFONT_FW_BOLD : FXFONT_FW_NORMAL;
« no previous file with comments | « xfa/fde/fde_gedevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698