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

loplugin:useuniqueptr in EMFPPen

Change-Id: Icc50b2ff1d6c7490b67d39aed7c3621b74c03bac
üst 42b80f4e
......@@ -91,8 +91,6 @@ namespace cppcanvas
EMFPPen::~EMFPPen()
{
delete customStartCap;
delete customEndCap;
}
void EMFPPen::SetStrokeWidth(rendering::StrokeAttributes& rStrokeAttributes, ImplRenderer const & rR, const OutDevState& rState)
......@@ -267,7 +265,7 @@ namespace cppcanvas
SAL_INFO("cppcanvas.emf", "EMF+\t\tcustomStartCapLen: " << customStartCapLen);
sal_uInt64 const pos = s.Tell();
customStartCap = new EMFPCustomLineCap();
customStartCap.reset( new EMFPCustomLineCap() );
customStartCap->Read(s, rR);
// maybe we don't read everything yet, play it safe ;-)
......@@ -282,7 +280,7 @@ namespace cppcanvas
SAL_INFO("cppcanvas.emf", "EMF+\t\tcustomEndCapLen: " << customEndCapLen);
sal_uInt64 const pos = s.Tell();
customEndCap = new EMFPCustomLineCap();
customEndCap.reset( new EMFPCustomLineCap() );
customEndCap->Read(s, rR);
// maybe we don't read everything yet, play it safe ;-)
......
......@@ -52,9 +52,9 @@ namespace cppcanvas
sal_Int32 alignment;
std::vector<float> compoundArray;
sal_Int32 customStartCapLen;
EMFPCustomLineCap *customStartCap;
std::unique_ptr<EMFPCustomLineCap> customStartCap;
sal_Int32 customEndCapLen;
EMFPCustomLineCap *customEndCap;
std::unique_ptr<EMFPCustomLineCap> customEndCap;
EMFPPen();
......
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