From 6dd794a09deb6a4092f8fb45dc5598946da6df41 Mon Sep 17 00:00:00 2001 From: Bruno Lalande Date: Sun, 23 Sep 2012 21:20:25 +0000 Subject: [PATCH] Removed now unused Point template parameter from dispatch::centroid. [SVN r80680] --- .../boost/geometry/algorithms/centroid.hpp | 34 +++++++------------ .../geometry/multi/algorithms/centroid.hpp | 24 ++++--------- 2 files changed, 18 insertions(+), 40 deletions(-) diff --git a/include/boost/geometry/algorithms/centroid.hpp b/include/boost/geometry/algorithms/centroid.hpp index 048948de5..0fd711505 100644 --- a/include/boost/geometry/algorithms/centroid.hpp +++ b/include/boost/geometry/algorithms/centroid.hpp @@ -266,41 +266,32 @@ namespace dispatch template < typename Tag, - typename Geometry, - typename Point + typename Geometry > struct centroid {}; -template -< - typename Geometry, - typename Point -> -struct centroid +template +struct centroid : detail::centroid::centroid_point {}; -template -< - typename Box, - typename Point -> -struct centroid +template +struct centroid : detail::centroid::centroid_box {}; -template -struct centroid +template +struct centroid : detail::centroid::centroid_range::value> {}; -template -struct centroid +template +struct centroid : detail::centroid::centroid_range {}; -template -struct centroid +template +struct centroid : detail::centroid::centroid_polygon {}; @@ -340,8 +331,7 @@ inline void centroid(Geometry const& geometry, Point& c, dispatch::centroid < typename tag::type, - Geometry, - Point + Geometry >::apply(geometry, c, strategy); } diff --git a/include/boost/geometry/multi/algorithms/centroid.hpp b/include/boost/geometry/multi/algorithms/centroid.hpp index 1f73d4e9a..81cd75136 100644 --- a/include/boost/geometry/multi/algorithms/centroid.hpp +++ b/include/boost/geometry/multi/algorithms/centroid.hpp @@ -95,24 +95,16 @@ struct centroid_multi namespace dispatch { -template -< - typename MultiLinestring, - typename Point -> -struct centroid +template +struct centroid : detail::centroid::centroid_multi < detail::centroid::centroid_range_state > {}; -template -< - typename MultiPolygon, - typename Point -> -struct centroid +template +struct centroid : detail::centroid::centroid_multi < detail::centroid::centroid_polygon_state @@ -120,12 +112,8 @@ struct centroid {}; -template -< - typename MultiPoint, - typename Point -> -struct centroid +template +struct centroid : detail::centroid::centroid_multi < detail::centroid::centroid_multi_point_state