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

Unified Diff: xfa/fxfa/app/xfa_textlayout.h

Issue 1960673003: Replace some calls to Release() with direct delete, part 1. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add unique ptrs Created 4 years, 7 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
Index: xfa/fxfa/app/xfa_textlayout.h
diff --git a/xfa/fxfa/app/xfa_textlayout.h b/xfa/fxfa/app/xfa_textlayout.h
index 17450ddeabdede14d8cd47fac781dcd621b89055..4d03aee302110512fb3a9b3edd9c73b4ec5b2cb9 100644
--- a/xfa/fxfa/app/xfa_textlayout.h
+++ b/xfa/fxfa/app/xfa_textlayout.h
@@ -8,6 +8,7 @@
#define XFA_FXFA_APP_XFA_TEXTLAYOUT_H_
#include <map>
+#include <memory>
#include "xfa/fde/css/fde_css.h"
#include "xfa/fde/fde_gedevice.h"
@@ -79,7 +80,7 @@ class CXFA_TextParseContext : public CFX_Target {
class CXFA_TextParser {
public:
- CXFA_TextParser() : m_pAllocator(NULL), m_pSelector(NULL), m_pUASheet(NULL) {}
+ CXFA_TextParser();
virtual ~CXFA_TextParser();
void Reset();
void DoParse(CFDE_XMLNode* pXMLContainer, CXFA_TextProvider* pTextProvider);
@@ -131,7 +132,7 @@ class CXFA_TextParser {
IFDE_CSSStyleSheet* LoadDefaultSheetStyle();
IFDE_CSSComputedStyle* CreateStyle(IFDE_CSSComputedStyle* pParentStyle);
IFX_MemoryAllocator* m_pAllocator;
- CFDE_CSSStyleSelector* m_pSelector;
+ std::unique_ptr<CFDE_CSSStyleSelector> m_pSelector;
IFDE_CSSStyleSheet* m_pUASheet;
CFX_MapPtrTemplate<CFDE_XMLNode*, CXFA_TextParseContext*>
m_mapXMLNodeToParseContext;

Powered by Google App Engine
This is Rietveld 408576698