summaryrefslogtreecommitdiff
path: root/idl/source
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/source
parent13e55cedd2944c41f3f4fe7032cfea1ef9e6015d (diff)
loplugin:useuniqueptr in idl
Change-Id: I3681d119dda85400dbb33c96fab736c262f7ce8a
Diffstat (limited to 'idl/source')
-rw-r--r--idl/source/prj/command.cxx4
-rw-r--r--idl/source/prj/database.cxx4
-rw-r--r--idl/source/prj/globals.cxx2
3 files changed, 3 insertions, 7 deletions
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index 50d410819c28..740d384add60 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -108,9 +108,9 @@ char const CommandLineSyntax[] =
void Init()
{
if( !GetIdlApp().pHashTable )
- GetIdlApp().pHashTable = new SvStringHashTable;
+ GetIdlApp().pHashTable.reset( new SvStringHashTable );
if( !GetIdlApp().pGlobalNames )
- GetIdlApp().pGlobalNames = new SvGlobalHashNames();
+ GetIdlApp().pGlobalNames.reset( new SvGlobalHashNames() );
}
bool ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand )
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 62340e70cb0b..62e209fb3f5f 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -54,8 +54,6 @@ SvIdlDataBase::SvIdlDataBase( const SvCommand& rCmd )
SvIdlDataBase::~SvIdlDataBase()
{
aIdFileList.clear();
-
- delete pIdTable;
}
#define ADD_TYPE( Name ) \
@@ -126,7 +124,7 @@ bool SvIdlDataBase::FindId( const OString& rIdName, sal_uLong * pVal )
void SvIdlDataBase::InsertId( const OString& rIdName, sal_uLong nVal )
{
if( !pIdTable )
- pIdTable = new SvStringHashTable;
+ pIdTable.reset( new SvStringHashTable );
sal_uInt32 nHash;
pIdTable->Insert( rIdName, &nHash )->SetValue( nVal );
diff --git a/idl/source/prj/globals.cxx b/idl/source/prj/globals.cxx
index 965369b1f130..f57445b56828 100644
--- a/idl/source/prj/globals.cxx
+++ b/idl/source/prj/globals.cxx
@@ -41,8 +41,6 @@ IdlDll::IdlDll()
IdlDll::~IdlDll()
{
- delete pGlobalNames;
- delete pHashTable;
}
inline SvStringHashEntry * INS( const OString& rName )