Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64263 - in sandbox/geometry/boost/geometry: algorithms extensions/nsphere/algorithms
From: barend.gehrels_at_[hidden]
Date: 2010-07-22 12:04:07


Author: barendgehrels
Date: 2010-07-22 12:04:05 EDT (Thu, 22 Jul 2010)
New Revision: 64263
URL: http://svn.boost.org/trac/boost/changeset/64263

Log:
Fixed make_distance_result for within extension
Typos
Text files modified:
   sandbox/geometry/boost/geometry/algorithms/overlaps.hpp | 2 +-
   sandbox/geometry/boost/geometry/algorithms/within.hpp | 9 ++++++++-
   sandbox/geometry/boost/geometry/extensions/nsphere/algorithms/within.hpp | 15 +++++++++++----
   3 files changed, 20 insertions(+), 6 deletions(-)

Modified: sandbox/geometry/boost/geometry/algorithms/overlaps.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/overlaps.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/overlaps.hpp 2010-07-22 12:04:05 EDT (Thu, 22 Jul 2010)
@@ -162,7 +162,7 @@
 {
     BOOST_MPL_ASSERT_MSG
         (
- false, NOT_OR_NOT_YET_IMPLEMENT_FOR_THIS_GEOMETRY_TYPE
+ false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
             , (types<Geometry1, Geometry2>)
         );
 };

Modified: sandbox/geometry/boost/geometry/algorithms/within.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/within.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/within.hpp 2010-07-22 12:04:05 EDT (Thu, 22 Jul 2010)
@@ -47,6 +47,7 @@
 #include <cstddef>
 
 #include <boost/range.hpp>
+#include <boost/mpl/assert.hpp>
 
 #include <boost/geometry/algorithms/make.hpp>
 
@@ -283,7 +284,13 @@
     typename Strategy
>
 struct within
-{};
+{
+ BOOST_MPL_ASSERT_MSG
+ (
+ false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
+ , (types<Geometry1, Geometry2>)
+ );
+};
 
 
 template <typename Point, typename Box, typename Strategy>

Modified: sandbox/geometry/boost/geometry/extensions/nsphere/algorithms/within.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/extensions/nsphere/algorithms/within.hpp (original)
+++ sandbox/geometry/boost/geometry/extensions/nsphere/algorithms/within.hpp 2010-07-22 12:04:05 EDT (Thu, 22 Jul 2010)
@@ -39,18 +39,25 @@
 template<typename P, typename C>
 inline bool point_in_circle(P const& p, C const& c)
 {
+ namespace services = strategy::distance::services;
+
     assert_dimension<C, 2>();
 
     typedef typename point_type<C>::type point_type;
- typedef typename strategy::distance::services::default_strategy
+ typedef typename services::default_strategy
         <
             point_tag, P, point_type
>::type strategy_type;
- typedef typename strategy::distance::services::return_type<strategy_type>::type return_type;
+ typedef typename services::return_type<strategy_type>::type return_type;
+
+ strategy_type strategy;
 
     P const center = geometry::make<P>(get<0>(c), get<1>(c));
- return_type const r = geometry::distance(p, center);
- return_type const rad = make_distance_result<return_type>(get_radius<0>(c));
+ return_type const r = geometry::distance(p, center, strategy);
+ return_type const rad = services::result_from_distance
+ <
+ strategy_type
+ >::apply(strategy, get_radius<0>(c));
 
     return r < rad;
 }


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