diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2015-11-16 22:57:28 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2015-11-16 22:57:28 +0000 |
| commit | 8bd87961810251cac534f8f308a4b91e5d21afe0 (patch) | |
| tree | c9e981e83392ab6d717ae06e46d8a12735b28c56 /src/2geom | |
| parent | static code analysis (diff) | |
| download | inkscape-8bd87961810251cac534f8f308a4b91e5d21afe0.tar.gz inkscape-8bd87961810251cac534f8f308a4b91e5d21afe0.zip | |
removes warnings when compiling with c++11 using uniqueptr instead of autoptr
(bzr r14475)
Diffstat (limited to 'src/2geom')
| -rw-r--r-- | src/2geom/curve.cpp | 4 | ||||
| -rw-r--r-- | src/2geom/elliptical-arc.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/2geom/curve.cpp b/src/2geom/curve.cpp index b45228514..24c8be9f8 100644 --- a/src/2geom/curve.cpp +++ b/src/2geom/curve.cpp @@ -108,7 +108,11 @@ 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; +#if __cplusplus <= 199711L std::auto_ptr<Curve> deriv(derivative()); +#else + std::unique_ptr<Curve> deriv(derivative()); +#endif splits = deriv->roots(0, X); if (splits.empty()) { return result; diff --git a/src/2geom/elliptical-arc.cpp b/src/2geom/elliptical-arc.cpp index 25a78b4ad..77d3d788d 100644 --- a/src/2geom/elliptical-arc.cpp +++ b/src/2geom/elliptical-arc.cpp @@ -354,7 +354,11 @@ EllipticalArc::pointAndDerivatives(Coord t, unsigned int n) const std::vector<Point> result; result.reserve(nn); double angle = angleAt(t); +#if __cplusplus <= 199711L std::auto_ptr<EllipticalArc> ea( static_cast<EllipticalArc*>(duplicate()) ); +#else + std::unique_ptr<EllipticalArc> ea( static_cast<EllipticalArc*>(duplicate()) ); +#endif ea->_ellipse.setCenter(0, 0); unsigned int m = std::min(nn, 4u); for ( unsigned int i = 0; i < m; ++i ) |
