diff options
author | weili <weili@chromium.org> | 2016-07-25 07:40:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-25 07:40:27 -0700 |
commit | 9b671ace8aec906683b05399cf8a2882ed8ef7b6 (patch) | |
tree | ca6193f08a18ffe917301fd523c6c668becb7bdb /xfa/fgas | |
parent | d780735def22c4c2ec3a0cc89856c86486c25494 (diff) | |
download | pdfium-9b671ace8aec906683b05399cf8a2882ed8ef7b6.tar.xz |
Use smart pointers for CFX_Font and CFX_Type3Font classes
For the class owned member variables, use std::unique_ptr or
std::vector for memory management.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2169793002
Diffstat (limited to 'xfa/fgas')
-rw-r--r-- | xfa/fgas/font/fgas_gefont.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/fgas/font/fgas_gefont.cpp b/xfa/fgas/font/fgas_gefont.cpp index 576f482df2..48635cabf7 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; |