summaryrefslogtreecommitdiff
path: root/sax/source/expatwrap
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-17 15:18:00 +0200
committerNoel Grandin <noel@peralex.com>2015-11-18 08:35:34 +0200
commit9c205723fcc0a2087ff7bf1e86f4f07b62564d5d (patch)
treed45307f20c1c4e3c6be023fd8dd27cd91e2a948a /sax/source/expatwrap
parentb442d5dd3c230a8a1dabaa7cc0333911ba456859 (diff)
use unique_ptr for pImpl in sax/
Change-Id: I0bef03451437cbdc5b0fed6b67690ac1d547291d
Diffstat (limited to 'sax/source/expatwrap')
-rw-r--r--sax/source/expatwrap/attrlistimpl.cxx7
-rw-r--r--sax/source/expatwrap/attrlistimpl.hxx3
2 files changed, 5 insertions, 5 deletions
diff --git a/sax/source/expatwrap/attrlistimpl.cxx b/sax/source/expatwrap/attrlistimpl.cxx
index 525659d9fde9..61bfe2b2ef83 100644
--- a/sax/source/expatwrap/attrlistimpl.cxx
+++ b/sax/source/expatwrap/attrlistimpl.cxx
@@ -64,9 +64,9 @@ sal_Int16 AttributeList::getLength() throw (RuntimeException, std::exception)
AttributeList::AttributeList( const AttributeList &r ) :
- cppu::WeakImplHelper<XAttributeList, XCloneable>()
+ cppu::WeakImplHelper<XAttributeList, XCloneable>(),
+ m_pImpl( new AttributeList_impl )
{
- m_pImpl = new AttributeList_impl;
*m_pImpl = *(r.m_pImpl);
}
@@ -134,15 +134,14 @@ Reference< XCloneable > AttributeList::createClone() throw (RuntimeException, st
AttributeList::AttributeList()
+ : m_pImpl( new AttributeList_impl )
{
- m_pImpl = new AttributeList_impl;
}
AttributeList::~AttributeList()
{
- delete m_pImpl;
}
diff --git a/sax/source/expatwrap/attrlistimpl.hxx b/sax/source/expatwrap/attrlistimpl.hxx
index f5d283f92ccc..7910767f7739 100644
--- a/sax/source/expatwrap/attrlistimpl.hxx
+++ b/sax/source/expatwrap/attrlistimpl.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#include <memory>
namespace sax_expatwrap
{
@@ -65,7 +66,7 @@ public:
createClone() throw(css::uno::RuntimeException, std::exception) override;
private:
- struct AttributeList_impl *m_pImpl;
+ std::unique_ptr<AttributeList_impl> m_pImpl;
};
}