From bb0d446df18ee34504a165f3fc96fbb81b274f31 Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 27 Apr 2016 16:59:30 -0700 Subject: Replace CFX_PtrArray with typesafe CFX_ArrayTemplate<>, part 3 Review-Url: https://codereview.chromium.org/1924093003 --- xfa/fxfa/app/xfa_fontmgr.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'xfa/fxfa/app/xfa_fontmgr.cpp') diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp index 69883674e5..608c9073c3 100644 --- a/xfa/fxfa/app/xfa_fontmgr.cpp +++ b/xfa/fxfa/app/xfa_fontmgr.cpp @@ -1737,11 +1737,8 @@ const XFA_FONTINFO* XFA_GetFontINFOByFontName( } CXFA_DefFontMgr::~CXFA_DefFontMgr() { - int32_t iCounts = m_CacheFonts.GetSize(); - for (int32_t i = 0; i < iCounts; i++) { - ((IFX_Font*)m_CacheFonts[i])->Release(); - } - m_CacheFonts.RemoveAll(); + for (int32_t i = 0; i < m_CacheFonts.GetSize(); i++) + m_CacheFonts[i]->Release(); } IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc, -- cgit v1.2.3