summaryrefslogtreecommitdiff
path: root/idlc/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-17 15:12:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-17 15:15:28 +0200
commit6ae487db5a1045d000c14604503e9c8f3bf24e30 (patch)
tree5178be02cb15ef3d964ad150b4de0088fddc7d1f /idlc/inc
parentfb4296d14f0421e289afa5e456b75082cdf8716f (diff)
fix use of std::unique_ptr in Idlc
I removed the deletes in the destructor in commit b27fee9e0ebb445ce82baeade3b249807dca392b Date: Wed Jan 10 11:44:28 2018 +0200 loplugin:useuniqueptr cppu,idlc,io,ucbhelper but forgot to do the actual conversion Change-Id: Icb03070e1d8a2b10ccf892f01e9b44cc6bf0156f
Diffstat (limited to 'idlc/inc')
-rw-r--r--idlc/inc/idlc.hxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/idlc/inc/idlc.hxx b/idlc/inc/idlc.hxx
index 881078303e4a..42f16836adbb 100644
--- a/idlc/inc/idlc.hxx
+++ b/idlc/inc/idlc.hxx
@@ -22,6 +22,7 @@
#include "idlctypes.hxx"
#include "aststack.hxx"
#include "options.hxx"
+#include <memory>
#ifdef SAL_UNX
#define SEPARATOR '/'
@@ -51,9 +52,9 @@ public:
Options* getOptions()
{ return m_pOptions; }
AstStack* scopes()
- { return m_pScopes; }
+ { return m_pScopes.get(); }
AstModule* getRoot()
- { return m_pRoot; }
+ { return m_pRoot.get(); }
const OString& getFileName() const
{ return m_fileName; }
void setFileName(const OString& fileName)
@@ -115,8 +116,8 @@ public:
void reset();
private:
Options* m_pOptions;
- AstStack* m_pScopes;
- AstModule* m_pRoot;
+ std::unique_ptr<AstStack> m_pScopes;
+ std::unique_ptr<AstModule> m_pRoot;
OString m_fileName;
OString m_mainFileName;
OString m_realFileName;