summaryrefslogtreecommitdiff
path: root/idl/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-15 16:33:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-19 08:58:46 +0200
commit61bfcf16dc6e4cedcd82b51a646b89909f035f2d (patch)
treee77b6e53312197d841873e0ea9d3bd6562aa63e2 /idl/inc
parent13e55cedd2944c41f3f4fe7032cfea1ef9e6015d (diff)
loplugin:useuniqueptr in idl
Change-Id: I3681d119dda85400dbb33c96fab736c262f7ce8a
Diffstat (limited to 'idl/inc')
-rw-r--r--idl/inc/database.hxx2
-rw-r--r--idl/inc/globals.hxx7
2 files changed, 5 insertions, 4 deletions
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index bc4ef2a5e27e..65ef714d939b 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -71,7 +71,7 @@ class SvIdlDataBase
sal_uInt32 nUniqueId;
sal_uInt32 nVerbosity;
StringList aIdFileList;
- SvStringHashTable * pIdTable;
+ std::unique_ptr<SvStringHashTable> pIdTable;
SvRefMemberList<SvMetaType *> aTypeList;
SvRefMemberList<SvMetaClass *> aClassList;
diff --git a/idl/inc/globals.hxx b/idl/inc/globals.hxx
index 0e118a16a1e3..033a8f270350 100644
--- a/idl/inc/globals.hxx
+++ b/idl/inc/globals.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_IDL_INC_GLOBALS_HXX
#include "hash.hxx"
+#include <memory>
struct SvGlobalHashNames
{
@@ -68,8 +69,8 @@ struct SvGlobalHashNames
class IdlDll
{
public:
- SvStringHashTable * pHashTable;
- SvGlobalHashNames * pGlobalNames;
+ std::unique_ptr<SvStringHashTable> pHashTable;
+ std::unique_ptr<SvGlobalHashNames> pGlobalNames;
IdlDll();
~IdlDll();
@@ -81,7 +82,7 @@ IdlDll & GetIdlApp();
inline SvStringHashEntry * SvHash_##Name() \
{ \
if( !GetIdlApp().pGlobalNames ) \
- GetIdlApp().pGlobalNames = new SvGlobalHashNames(); \
+ GetIdlApp().pGlobalNames.reset( new SvGlobalHashNames() ); \
return GetIdlApp().pGlobalNames->MM_##Name; \
}