Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76672 - in trunk/boost/geometry: algorithms multi/algorithms
From: bruno.lalande_at_[hidden]
Date: 2012-01-24 16:15:49


Author: bruno.lalande
Date: 2012-01-24 16:15:48 EST (Tue, 24 Jan 2012)
New Revision: 76672
URL: http://svn.boost.org/trac/boost/changeset/76672

Log:
Moved Strategy template parameter from class level to function level in dispatch::covered_by.
Text files modified:
   trunk/boost/geometry/algorithms/covered_by.hpp | 27 ++++++++++++++-------------
   trunk/boost/geometry/multi/algorithms/covered_by.hpp | 5 +++--
   2 files changed, 17 insertions(+), 15 deletions(-)

Modified: trunk/boost/geometry/algorithms/covered_by.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/covered_by.hpp (original)
+++ trunk/boost/geometry/algorithms/covered_by.hpp 2012-01-24 16:15:48 EST (Tue, 24 Jan 2012)
@@ -35,7 +35,6 @@
 <
     typename Geometry1,
     typename Geometry2,
- typename Strategy,
     typename Tag1 = typename tag<Geometry1>::type,
     typename Tag2 = typename tag<Geometry2>::type
>
@@ -49,18 +48,20 @@
 };
 
 
-template <typename Point, typename Box, typename Strategy>
-struct covered_by<Point, Box, Strategy, point_tag, box_tag>
+template <typename Point, typename Box>
+struct covered_by<Point, Box, point_tag, box_tag>
 {
+ template <typename Strategy>
     static inline bool apply(Point const& point, Box const& box, Strategy const& strategy)
     {
         return strategy.apply(point, box);
     }
 };
 
-template <typename Box1, typename Box2, typename Strategy>
-struct covered_by<Box1, Box2, Strategy, box_tag, box_tag>
+template <typename Box1, typename Box2>
+struct covered_by<Box1, Box2, box_tag, box_tag>
 {
+ template <typename Strategy>
     static inline bool apply(Box1 const& box1, Box2 const& box2, Strategy const& strategy)
     {
         assert_dimension_equal<Box1, Box2>();
@@ -70,9 +71,10 @@
 
 
 
-template <typename Point, typename Ring, typename Strategy>
-struct covered_by<Point, Ring, Strategy, point_tag, ring_tag>
+template <typename Point, typename Ring>
+struct covered_by<Point, Ring, point_tag, ring_tag>
 {
+ template <typename Strategy>
     static inline bool apply(Point const& point, Ring const& ring, Strategy const& )
     {
         return detail::within::point_in_ring
@@ -86,9 +88,10 @@
     }
 };
 
-template <typename Point, typename Polygon, typename Strategy>
-struct covered_by<Point, Polygon, Strategy, point_tag, polygon_tag>
+template <typename Point, typename Polygon>
+struct covered_by<Point, Polygon, point_tag, polygon_tag>
 {
+ template <typename Strategy>
     static inline bool apply(Point const& point, Polygon const& polygon, Strategy const& strategy)
     {
         return detail::within::point_in_polygon
@@ -152,8 +155,7 @@
     return dispatch::covered_by
         <
             Geometry1,
- Geometry2,
- strategy_type
+ Geometry2
>::apply(geometry1, geometry2, strategy_type());
 }
 
@@ -192,8 +194,7 @@
     return dispatch::covered_by
         <
             Geometry1,
- Geometry2,
- Strategy
+ Geometry2
>::apply(geometry1, geometry2, strategy);
 }
 

Modified: trunk/boost/geometry/multi/algorithms/covered_by.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/covered_by.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/covered_by.hpp 2012-01-24 16:15:48 EST (Tue, 24 Jan 2012)
@@ -29,9 +29,10 @@
 namespace dispatch
 {
 
-template <typename Point, typename MultiPolygon, typename Strategy>
-struct covered_by<Point, MultiPolygon, Strategy, point_tag, multi_polygon_tag>
+template <typename Point, typename MultiPolygon>
+struct covered_by<Point, MultiPolygon, point_tag, multi_polygon_tag>
 {
+ template <typename Strategy>
     static inline bool apply(Point const& point,
                 MultiPolygon const& multi_polygon, Strategy const& 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