Kaydet (Commit) a264b4c8 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in VectorGraphicData

Change-Id: I73badcdf544b1c3508c9eb9e489b049a9fa12928
üst 89a21453
......@@ -26,6 +26,7 @@
#include <vcl/wmfexternal.hxx>
#include <rtl/ustring.hxx>
#include <deque>
#include <memory>
typedef css::uno::Sequence<sal_Int8> VectorGraphicDataArray;
......@@ -65,7 +66,7 @@ private:
VectorGraphicDataType meVectorGraphicDataType;
// extra:
WmfExternal* mpExternalHeader;
std::unique_ptr<WmfExternal> mpExternalHeader;
// on demand creators
void ensureReplacement();
......
......@@ -129,7 +129,7 @@ void VectorGraphicData::setWmfExternalHeader(const WmfExternal& aExtHeader)
{
if (!mpExternalHeader)
{
mpExternalHeader = new WmfExternal;
mpExternalHeader.reset( new WmfExternal );
}
*mpExternalHeader = aExtHeader;
......@@ -269,10 +269,6 @@ VectorGraphicData::VectorGraphicData(
VectorGraphicData::~VectorGraphicData()
{
if (mpExternalHeader)
{
delete mpExternalHeader;
};
}
const basegfx::B2DRange& VectorGraphicData::getRange() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment