diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-16 14:50:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-19 08:58:46 +0200 |
commit | 24cbc7a1fc857748dfba31b426f786307b779d48 (patch) | |
tree | 5ff6b3b75a51d3e37684941504c505fef4c1f7f1 /basic | |
parent | 59548784486cfa42662490432474431f760dacc1 (diff) |
loplugin:useuniqueptr in SbUnoMethod
Change-Id: Ibeae1754a18152c3a17379c95e3caa536a8822db
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 4 | ||||
-rw-r--r-- | basic/source/inc/sbunoobj.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index fc2b6fac29ef..034ee01d0bba 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2493,7 +2493,7 @@ SbUnoMethod::SbUnoMethod SbUnoMethod::~SbUnoMethod() { - delete pParamInfoSeq; + pParamInfoSeq.reset(); if( this == pFirst ) pFirst = pNext; @@ -2535,7 +2535,7 @@ const Sequence<ParamInfo>& SbUnoMethod::getParamInfos() Sequence<ParamInfo> aTmp; if (m_xUnoMethod.is()) aTmp = m_xUnoMethod->getParameterInfos(); - pParamInfoSeq = new Sequence<ParamInfo>(aTmp); + pParamInfoSeq.reset( new Sequence<ParamInfo>(aTmp) ); } return *pParamInfoSeq; } diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index b31e34966d4e..2df319ffbb21 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -154,7 +154,7 @@ class SbUnoMethod : public SbxMethod friend void clearUnoMethodsForBasic( StarBASIC const * pBasic ); css::uno::Reference< css::reflection::XIdlMethod > m_xUnoMethod; - css::uno::Sequence< css::reflection::ParamInfo >* pParamInfoSeq; + std::unique_ptr<css::uno::Sequence< css::reflection::ParamInfo >> pParamInfoSeq; // #67781 reference to the previous and the next method in the method list SbUnoMethod* pPrev; |