From 35ee5bb4a2e51fd42f07c23a4008bfb97e390b25 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 26 Jan 2017 09:45:57 -0500 Subject: Cleanup memory in CFDE_CSSStyleSelector This CL fixes up the bare new calls in CFDE_CSSStyleSelector and replaces them with unique_ptrs. Code massaged to work correclty with new types. Change-Id: I90fce1ed7486da97fe7b5e597e9d423748c069c0 Reviewed-on: https://pdfium-review.googlesource.com/2353 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- xfa/fxfa/app/cxfa_textparsecontext.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'xfa/fxfa/app/cxfa_textparsecontext.cpp') diff --git a/xfa/fxfa/app/cxfa_textparsecontext.cpp b/xfa/fxfa/app/cxfa_textparsecontext.cpp index e4beb1fcb0..851d84456b 100644 --- a/xfa/fxfa/app/cxfa_textparsecontext.cpp +++ b/xfa/fxfa/app/cxfa_textparsecontext.cpp @@ -12,21 +12,6 @@ CXFA_TextParseContext::CXFA_TextParseContext() : m_pParentStyle(nullptr), - m_ppMatchedDecls(nullptr), - m_dwMatchedDecls(0), m_eDisplay(FDE_CSSDisplay::None) {} -CXFA_TextParseContext::~CXFA_TextParseContext() { - FX_Free(m_ppMatchedDecls); -} - -void CXFA_TextParseContext::SetDecls(const CFDE_CSSDeclaration** ppDeclArray, - int32_t iDeclCount) { - if (iDeclCount <= 0 || !ppDeclArray) - return; - - m_dwMatchedDecls = iDeclCount; - m_ppMatchedDecls = FX_Alloc(CFDE_CSSDeclaration*, iDeclCount); - FXSYS_memcpy(m_ppMatchedDecls, ppDeclArray, - iDeclCount * sizeof(CFDE_CSSDeclaration*)); -} +CXFA_TextParseContext::~CXFA_TextParseContext() {} -- cgit v1.2.3