summaryrefslogtreecommitdiff
path: root/idlc/inc/fehelper.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-11 16:03:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-13 11:20:05 +0100
commit37464a0fb7f3bafe72126e65d34f2c15377a3964 (patch)
tree487117274ed62ba672c2d2ed485a9743645f0057 /idlc/inc/fehelper.hxx
parent9acf3da78a5146c5af557967eabd0c47bf54d466 (diff)
loplugin:useuniqueptr in idlc
Change-Id: Iccc50462ca115546422824b6814abf16a029f005 Reviewed-on: https://gerrit.libreoffice.org/47793 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'idlc/inc/fehelper.hxx')
-rw-r--r--idlc/inc/fehelper.hxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/idlc/inc/fehelper.hxx b/idlc/inc/fehelper.hxx
index 11668e6946be..be401defcaa1 100644
--- a/idlc/inc/fehelper.hxx
+++ b/idlc/inc/fehelper.hxx
@@ -46,16 +46,10 @@ public:
NodeType nodeType, OString* pName, OString const * pInherits,
std::vector< OString > const * typeParameters);
- ~FeInheritanceHeader()
- {
- if ( m_pName )
- delete m_pName;
- }
-
NodeType getNodeType() const
{ return m_nodeType; }
OString* getName()
- { return m_pName; }
+ { return m_pName.get(); }
AstDeclaration* getInherits()
{ return m_pInherits; }
@@ -66,7 +60,7 @@ private:
void initializeInherits(OString const * pinherits);
NodeType m_nodeType;
- OString* m_pName;
+ std::unique_ptr<OString> m_pName;
AstDeclaration* m_pInherits;
std::vector< OString > m_typeParameters;
};