Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80684 - trunk/boost/geometry/algorithms
From: bruno.lalande_at_[hidden]
Date: 2012-09-23 18:18:25


Author: bruno.lalande
Date: 2012-09-23 18:18:24 EDT (Sun, 23 Sep 2012)
New Revision: 80684
URL: http://svn.boost.org/trac/boost/changeset/80684

Log:
Moved Strategy template parameter from class level to function level in dispatch::convex_hull.
Text files modified:
   trunk/boost/geometry/algorithms/convex_hull.hpp | 50 +++++++++------------------------------
   1 files changed, 12 insertions(+), 38 deletions(-)

Modified: trunk/boost/geometry/algorithms/convex_hull.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/convex_hull.hpp (original)
+++ trunk/boost/geometry/algorithms/convex_hull.hpp 2012-09-23 18:18:24 EDT (Sun, 23 Sep 2012)
@@ -40,18 +40,13 @@
 namespace detail { namespace convex_hull
 {
 
-template
-<
- typename Geometry,
- order_selector Order,
- typename Strategy
->
+template <order_selector Order>
 struct hull_insert
 {
 
     // Member template function (to avoid inconvenient declaration
     // of output-iterator-type, from hull_to_geometry)
- template <typename OutputIterator>
+ template <typename Geometry, typename OutputIterator, typename Strategy>
     static inline OutputIterator apply(Geometry const& geometry,
             OutputIterator out, Strategy const& strategy)
     {
@@ -63,22 +58,15 @@
     }
 };
 
-template
-<
- typename Geometry,
- typename Strategy
->
 struct hull_to_geometry
 {
- template <typename OutputGeometry>
+ template <typename Geometry, typename OutputGeometry, typename Strategy>
     static inline void apply(Geometry const& geometry, OutputGeometry& out,
             Strategy const& strategy)
     {
         hull_insert
             <
- Geometry,
- geometry::point_order<OutputGeometry>::value,
- Strategy
+ geometry::point_order<OutputGeometry>::value
>::apply(geometry,
                 std::back_inserter(
                     // Handle linestring, ring and polygon the same:
@@ -113,21 +101,16 @@
 template
 <
     typename Geometry,
- typename Strategy = typename detail::convex_hull::default_strategy<Geometry>::type,
     typename Tag = typename tag<Geometry>::type
>
 struct convex_hull
- : detail::convex_hull::hull_to_geometry<Geometry, Strategy>
+ : detail::convex_hull::hull_to_geometry
 {};
 
-template
-<
- typename Box,
- typename Strategy
->
-struct convex_hull<Box, Strategy, box_tag>
+template <typename Box>
+struct convex_hull<Box, box_tag>
 {
- template <typename OutputGeometry>
+ template <typename OutputGeometry, typename Strategy>
     static inline void apply(Box const& box, OutputGeometry& out,
             Strategy const& )
     {
@@ -149,13 +132,9 @@
 
 
 
-template
-<
- order_selector Order,
- typename Geometry, typename Strategy
->
+template <order_selector Order>
 struct convex_hull_insert
- : detail::convex_hull::hull_insert<Geometry, Order, Strategy>
+ : detail::convex_hull::hull_insert<Order>
 {};
 
 
@@ -181,11 +160,7 @@
         return;
     }
 
- dispatch::convex_hull
- <
- Geometry,
- Strategy
- >::apply(geometry, out, strategy);
+ dispatch::convex_hull<Geometry>::apply(geometry, out, strategy);
 }
 
 
@@ -232,8 +207,7 @@
 
     return dispatch::convex_hull_insert
         <
- geometry::point_order<Geometry>::value,
- Geometry, Strategy
+ geometry::point_order<Geometry>::value
>::apply(geometry, out, strategy);
 }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk