summaryrefslogtreecommitdiff
path: root/i18npool/source/localedata/localedata.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-16 14:15:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-17 08:34:42 +0000
commit7a60e90ef05c84923f83882efc01c33fef1ed305 (patch)
tree4c49f1ab14fda2a79e0d8efdb731d4d6fe924eba /i18npool/source/localedata/localedata.cxx
parenta9367c1b39600d5a5e2d0067113f06ad59cc37a1 (diff)
new loplugin: useuniqueptr: helpcompiler..io
Change-Id: I6b394163c144e6b5540cb160abb613d56fe327de Reviewed-on: https://gerrit.libreoffice.org/33165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool/source/localedata/localedata.cxx')
-rw-r--r--i18npool/source/localedata/localedata.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index 3a0c0ee2eeeb..f3499f9de386 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -1323,11 +1323,10 @@ class OutlineNumbering : public cppu::WeakImplHelper < container::XIndexAccess >
{
// OutlineNumbering helper class
- const OutlineNumberingLevel_Impl* m_pOutlineLevels;
+ std::unique_ptr<const OutlineNumberingLevel_Impl[]> m_pOutlineLevels;
sal_Int16 m_nCount;
public:
OutlineNumbering(const OutlineNumberingLevel_Impl* pOutlineLevels, int nLevels);
- virtual ~OutlineNumbering() override;
//XIndexAccess
virtual sal_Int32 SAL_CALL getCount( ) throw(RuntimeException, std::exception) override;
@@ -1498,11 +1497,6 @@ OutlineNumbering::OutlineNumbering(const OutlineNumberingLevel_Impl* pOutlnLevel
{
}
-OutlineNumbering::~OutlineNumbering()
-{
- delete [] m_pOutlineLevels;
-}
-
sal_Int32 OutlineNumbering::getCount( ) throw(RuntimeException, std::exception)
{
return m_nCount;
@@ -1513,7 +1507,7 @@ Any OutlineNumbering::getByIndex( sal_Int32 nIndex )
{
if(nIndex < 0 || nIndex >= m_nCount)
throw IndexOutOfBoundsException();
- const OutlineNumberingLevel_Impl* pTemp = m_pOutlineLevels;
+ const OutlineNumberingLevel_Impl* pTemp = m_pOutlineLevels.get();
pTemp += nIndex;
Any aRet;