summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2015-11-16 22:57:28 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2015-11-16 22:57:28 +0000
commit8bd87961810251cac534f8f308a4b91e5d21afe0 (patch)
treec9e981e83392ab6d717ae06e46d8a12735b28c56 /src
parentstatic code analysis (diff)
downloadinkscape-8bd87961810251cac534f8f308a4b91e5d21afe0.tar.gz
inkscape-8bd87961810251cac534f8f308a4b91e5d21afe0.zip
removes warnings when compiling with c++11 using uniqueptr instead of autoptr
(bzr r14475)
Diffstat (limited to 'src')
-rw-r--r--src/2geom/curve.cpp4
-rw-r--r--src/2geom/elliptical-arc.cpp4
-rw-r--r--src/live_effects/lpe-interpolate_points.cpp5
-rw-r--r--src/ui/control-manager.h6
-rw-r--r--src/ui/dialog/filter-effects-dialog.h8
5 files changed, 24 insertions, 3 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 )
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<Geom::Interpolate::Interpolator> interpolator( Geom::Interpolate::Interpolator::create(static_cast<Geom::Interpolate::InterpolatorType>(interpolator_type.get_value())) );
+#else
+ std::unique_ptr<Geom::Interpolate::Interpolator> interpolator( Geom::Interpolate::Interpolator::create(static_cast<Geom::Interpolate::InterpolatorType>(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<ControlManagerImpl> _impl;
-
+#else
+ std::unique_ptr<ControlManagerImpl> _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<Gtk::Menu> _menu;
sigc::signal<void> _signal_filter_changed;
+#if __cplusplus <= 199711L
std::auto_ptr<Inkscape::XML::SignalObserver> _observer;
+#else
+ std::unique_ptr<Inkscape::XML::SignalObserver> _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<Inkscape::XML::SignalObserver> _observer;
+#else
+ std::unique_ptr<Inkscape::XML::SignalObserver> _observer;
+#endif
int _input_type_width;
int _input_type_height;
};