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

loplugin:useuniqueptr in GeoTexSvxMultiHatch

Change-Id: I3d25a50ed7ebf78214c0d358243f7e286503b8f8
üst 9b0a74a4
......@@ -327,36 +327,33 @@ namespace drawinglayer
const double fAngleA(rHatch.getAngle());
maColor = rHatch.getColor();
mbFillBackground = rHatch.isFillBackground();
mp0 = new GeoTexSvxHatch(
mp0.reset( new GeoTexSvxHatch(
aOutlineRange,
aOutlineRange,
rHatch.getDistance(),
fAngleA);
fAngleA) );
if(attribute::HatchStyle::Double == rHatch.getStyle() || attribute::HatchStyle::Triple == rHatch.getStyle())
{
mp1 = new GeoTexSvxHatch(
mp1.reset( new GeoTexSvxHatch(
aOutlineRange,
aOutlineRange,
rHatch.getDistance(),
fAngleA + F_PI2);
fAngleA + F_PI2) );
}
if(attribute::HatchStyle::Triple == rHatch.getStyle())
{
mp2 = new GeoTexSvxHatch(
mp2.reset( new GeoTexSvxHatch(
aOutlineRange,
aOutlineRange,
rHatch.getDistance(),
fAngleA + F_PI4);
fAngleA + F_PI4) );
}
}
GeoTexSvxMultiHatch::~GeoTexSvxMultiHatch()
{
delete mp0;
delete mp1;
delete mp2;
}
bool GeoTexSvxMultiHatch::impIsOnHatch(const basegfx::B2DPoint& rUV) const
......
......@@ -123,9 +123,9 @@ namespace drawinglayer
{
basegfx::BColor maColor;
double mfLogicPixelSize;
GeoTexSvxHatch* mp0;
GeoTexSvxHatch* mp1;
GeoTexSvxHatch* mp2;
std::unique_ptr<GeoTexSvxHatch> mp0;
std::unique_ptr<GeoTexSvxHatch> mp1;
std::unique_ptr<GeoTexSvxHatch> mp2;
bool mbFillBackground : 1;
......
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