From d7f113604457bb3928cbe2ed7d84ca512c7bd9e9 Mon Sep 17 00:00:00 2001 From: Bruno Lalande Date: Wed, 25 Jan 2012 23:01:50 +0000 Subject: [PATCH] Moved Strategy template param from class level to function level in dispatch::within. [SVN r76694] --- include/boost/geometry/algorithms/within.hpp | 27 ++++++++++--------- .../geometry/multi/algorithms/within.hpp | 5 ++-- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/include/boost/geometry/algorithms/within.hpp b/include/boost/geometry/algorithms/within.hpp index 19d5b3d1d..f3ac43242 100644 --- a/include/boost/geometry/algorithms/within.hpp +++ b/include/boost/geometry/algorithms/within.hpp @@ -167,7 +167,6 @@ template < typename Geometry1, typename Geometry2, - typename Strategy, typename Tag1 = typename tag::type, typename Tag2 = typename tag::type > @@ -181,18 +180,20 @@ struct within }; -template -struct within +template +struct within { + template static inline bool apply(Point const& point, Box const& box, Strategy const& strategy) { return strategy.apply(point, box); } }; -template -struct within +template +struct within { + template static inline bool apply(Box1 const& box1, Box2 const& box2, Strategy const& strategy) { assert_dimension_equal(); @@ -202,9 +203,10 @@ struct within -template -struct within +template +struct within { + template static inline bool apply(Point const& point, Ring const& ring, Strategy const& strategy) { return detail::within::point_in_ring @@ -218,9 +220,10 @@ struct within } }; -template -struct within +template +struct within { + template static inline bool apply(Point const& point, Polygon const& polygon, Strategy const& strategy) { return detail::within::point_in_polygon @@ -292,8 +295,7 @@ inline bool within(Geometry1 const& geometry1, Geometry2 const& geometry2) return dispatch::within < Geometry1, - Geometry2, - strategy_type + Geometry2 >::apply(geometry1, geometry2, strategy_type()); } @@ -343,8 +345,7 @@ inline bool within(Geometry1 const& geometry1, Geometry2 const& geometry2, return dispatch::within < Geometry1, - Geometry2, - Strategy + Geometry2 >::apply(geometry1, geometry2, strategy); } diff --git a/include/boost/geometry/multi/algorithms/within.hpp b/include/boost/geometry/multi/algorithms/within.hpp index 2953bbd47..a3ec7514b 100644 --- a/include/boost/geometry/multi/algorithms/within.hpp +++ b/include/boost/geometry/multi/algorithms/within.hpp @@ -69,9 +69,10 @@ struct geometry_multi_within_code namespace dispatch { -template -struct within +template +struct within { + template static inline bool apply(Point const& point, MultiPolygon const& multi_polygon, Strategy const& strategy) {