diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2018-09-30 18:30:50 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2018-09-30 18:30:50 +0000 |
| commit | 50cc9b79df730bf5a6f4c5010168fff9342ccea7 (patch) | |
| tree | 711e790493ba7e0fde9ad9ae4ad2d01a0f8eb746 /src/2geom | |
| parent | refactor: simplify loop (diff) | |
| download | inkscape-50cc9b79df730bf5a6f4c5010168fff9342ccea7.tar.gz inkscape-50cc9b79df730bf5a6f4c5010168fff9342ccea7.zip | |
c++11 refactor: std::auto_ptr -> std::unique_ptr
Diffstat (limited to 'src/2geom')
| -rw-r--r-- | src/2geom/curve.cpp | 2 | ||||
| -rw-r--r-- | src/2geom/elliptical-arc-from-sbasis.cpp | 4 | ||||
| -rw-r--r-- | src/2geom/elliptical-arc.cpp | 2 |
3 files changed, 2 insertions, 6 deletions
diff --git a/src/2geom/curve.cpp b/src/2geom/curve.cpp index 387a9180b..8ad0178cf 100644 --- a/src/2geom/curve.cpp +++ b/src/2geom/curve.cpp @@ -108,7 +108,7 @@ std::vector<CurveIntersection> Curve::intersectSelf(Coord eps) const // Monotonic segments cannot have self-intersections. // Thus, we can split the curve at roots and intersect the portions. std::vector<Coord> splits; - std::auto_ptr<Curve> deriv(derivative()); + std::unique_ptr<Curve> deriv(derivative()); splits = deriv->roots(0, X); if (splits.empty()) { return result; diff --git a/src/2geom/elliptical-arc-from-sbasis.cpp b/src/2geom/elliptical-arc-from-sbasis.cpp index 54f995fb6..a8bf97166 100644 --- a/src/2geom/elliptical-arc-from-sbasis.cpp +++ b/src/2geom/elliptical-arc-from-sbasis.cpp @@ -304,11 +304,7 @@ bool make_elliptical_arc::make_elliptiarc() Point inner_point = curve(0.5); -#ifdef CPP11 std::unique_ptr<EllipticalArc> arc( e.arc(initial_point, inner_point, final_point) ); -#else - std::auto_ptr<EllipticalArc> arc( e.arc(initial_point, inner_point, final_point) ); -#endif ea = *arc; if ( !are_near( e.center(), diff --git a/src/2geom/elliptical-arc.cpp b/src/2geom/elliptical-arc.cpp index ec62b4be2..b7d60fd17 100644 --- a/src/2geom/elliptical-arc.cpp +++ b/src/2geom/elliptical-arc.cpp @@ -262,7 +262,7 @@ EllipticalArc::pointAndDerivatives(Coord t, unsigned int n) const std::vector<Point> result; result.reserve(nn); double angle = angleAt(t); - std::auto_ptr<EllipticalArc> ea( static_cast<EllipticalArc*>(duplicate()) ); + std::unique_ptr<EllipticalArc> ea( static_cast<EllipticalArc*>(duplicate()) ); ea->_ellipse.setCenter(0, 0); unsigned int m = std::min(nn, 4u); for ( unsigned int i = 0; i < m; ++i ) |
