summaryrefslogtreecommitdiff
path: root/stoc/source/inspect
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-18 13:57:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-19 09:35:21 +0000
commit0415cb335b953b9c10075fa524d7707db4aa55e5 (patch)
treef714106565c6c58a4711b21f966ecc09c8b83157 /stoc/source/inspect
parentc3e6d12301b42a44bd0d4584005686e324533b60 (diff)
new loplugin: useuniqueptr: sot..tools
Change-Id: Ided435d016ae28e7c3f2726e41eedd981572ae10 Reviewed-on: https://gerrit.libreoffice.org/33263 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source/inspect')
-rw-r--r--stoc/source/inspect/introspection.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 4a4ac6bcc170..da3b8c961ead 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -23,6 +23,7 @@
#include <cstddef>
#include <limits>
#include <map>
+#include <memory>
#include <set>
#include <o3tl/any.hxx>
@@ -209,7 +210,7 @@ class IntrospectionAccessStatic_Impl: public salhelper::SimpleReferenceObject
bool mbUnoTunnel;
// Original handles of FastPropertySets
- sal_Int32* mpOrgPropertyHandleArray;
+ std::unique_ptr<sal_Int32[]> mpOrgPropertyHandleArray;
// MethodSequence, that accepts all methods
std::vector< Reference<XIdlMethod> > maAllMethodSeq;
@@ -230,10 +231,6 @@ class IntrospectionAccessStatic_Impl: public salhelper::SimpleReferenceObject
public:
explicit IntrospectionAccessStatic_Impl( Reference< XIdlReflection > const & xCoreReflection_ );
- virtual ~IntrospectionAccessStatic_Impl() override
- {
- delete[] mpOrgPropertyHandleArray;
- }
sal_Int32 getPropertyIndex( const OUString& aPropertyName ) const;
sal_Int32 getMethodIndex( const OUString& aMethodName ) const;
@@ -1779,7 +1776,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
// For a FastPropertySet we must remember the original handles
if( bFast )
- pAccess->mpOrgPropertyHandleArray = new sal_Int32[ nLen ];
+ pAccess->mpOrgPropertyHandleArray.reset( new sal_Int32[ nLen ] );
for( i = 0 ; i < nLen ; i++ )
{