From 8bd87961810251cac534f8f308a4b91e5d21afe0 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Mon, 16 Nov 2015 23:57:28 +0100 Subject: removes warnings when compiling with c++11 using uniqueptr instead of autoptr (bzr r14475) --- src/2geom/curve.cpp | 4 ++++ src/2geom/elliptical-arc.cpp | 4 ++++ src/live_effects/lpe-interpolate_points.cpp | 5 ++++- src/ui/control-manager.h | 6 ++++-- src/ui/dialog/filter-effects-dialog.h | 8 ++++++++ 5 files changed, 24 insertions(+), 3 deletions(-) (limited to 'src') 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 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 splits; +#if __cplusplus <= 199711L std::auto_ptr deriv(derivative()); +#else + std::unique_ptr 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 result; result.reserve(nn); double angle = angleAt(t); +#if __cplusplus <= 199711L std::auto_ptr ea( static_cast(duplicate()) ); +#else + std::unique_ptr ea( static_cast(duplicate()) ); +#endif ea->_ellipse.setCenter(0, 0); unsigned int m = std::min(nn, 4u); for ( unsigned int i = 0; i < m; ++i ) diff --git a/src/live_effects/lpe-interpolate_points.cpp b/src/live_effects/lpe-interpolate_points.cpp index 4ac139752..cf70832ee 100644 --- a/src/live_effects/lpe-interpolate_points.cpp +++ b/src/live_effects/lpe-interpolate_points.cpp @@ -52,8 +52,11 @@ Geom::PathVector LPEInterpolatePoints::doEffect_path (Geom::PathVector const & path_in) { Geom::PathVector path_out; - +#if __cplusplus <= 199711L std::auto_ptr interpolator( Geom::Interpolate::Interpolator::create(static_cast(interpolator_type.get_value())) ); +#else + std::unique_ptr interpolator( Geom::Interpolate::Interpolator::create(static_cast(interpolator_type.get_value())) ); +#endif for(Geom::PathVector::const_iterator path_it = path_in.begin(); path_it != path_in.end(); ++path_it) { if (path_it->empty()) diff --git a/src/ui/control-manager.h b/src/ui/control-manager.h index 05a53f6a0..964ad0a29 100644 --- a/src/ui/control-manager.h +++ b/src/ui/control-manager.h @@ -74,9 +74,11 @@ public: private: ControlManager(); - +#if __cplusplus <= 199711L std::auto_ptr _impl; - +#else + std::unique_ptr _impl; +#endif friend class ControlManagerImpl; }; diff --git a/src/ui/dialog/filter-effects-dialog.h b/src/ui/dialog/filter-effects-dialog.h index a067cd70c..283abb5b0 100644 --- a/src/ui/dialog/filter-effects-dialog.h +++ b/src/ui/dialog/filter-effects-dialog.h @@ -127,7 +127,11 @@ private: Gtk::Button _add; Glib::RefPtr _menu; sigc::signal _signal_filter_changed; +#if __cplusplus <= 199711L std::auto_ptr _observer; +#else + std::unique_ptr _observer; +#endif }; class PrimitiveColumns : public Gtk::TreeModel::ColumnRecord @@ -243,7 +247,11 @@ private: sigc::connection _scroll_connection; int _autoscroll_y; int _autoscroll_x; +#if __cplusplus <= 199711L std::auto_ptr _observer; +#else + std::unique_ptr _observer; +#endif int _input_type_width; int _input_type_height; }; -- cgit v1.2.3