summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/cxfa_textparsecontext.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-26 09:45:57 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-26 15:05:05 +0000
commit35ee5bb4a2e51fd42f07c23a4008bfb97e390b25 (patch)
treec15fd938e4ab87136dc97ef7bdd4e576d1378703 /xfa/fxfa/app/cxfa_textparsecontext.cpp
parentcff5618d4e847b9f13e1f051d56e09ee00cfb089 (diff)
downloadpdfium-35ee5bb4a2e51fd42f07c23a4008bfb97e390b25.tar.xz
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 <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/app/cxfa_textparsecontext.cpp')
-rw-r--r--xfa/fxfa/app/cxfa_textparsecontext.cpp17
1 files changed, 1 insertions, 16 deletions
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() {}