Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81949 - in sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree: . visitors
From: adam.wulkiewicz_at_[hidden]
Date: 2012-12-14 14:46:19


Author: awulkiew
Date: 2012-12-14 14:46:18 EST (Fri, 14 Dec 2012)
New Revision: 81949
URL: http://svn.boost.org/trac/boost/changeset/81949

Log:
Small improvement to the nearest_query added.
Text files modified:
   sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp | 3 +--
   sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/nearest_query.hpp | 4 ++--
   2 files changed, 3 insertions(+), 4 deletions(-)

Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp 2012-12-14 14:46:18 EST (Fri, 14 Dec 2012)
@@ -913,8 +913,7 @@
 
         detail::rtree::apply_visitor(nearest_v, *m_root);
 
- //return result.get(v);
- return result.is_comparable_distance_valid() ? 1 : 0;
+ return result.get(v);
     }
 
     /*!

Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/nearest_query.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/nearest_query.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/nearest_query.hpp 2012-12-14 14:46:18 EST (Fri, 14 Dec 2012)
@@ -33,7 +33,7 @@
         typename translator::indexable_type<Translator>::type
>::type distance_type;
 
- inline nearest_query_result_one(Value & value)
+ inline nearest_query_result_one(Value const& value)
         : m_value(value)
         , m_comp_dist((std::numeric_limits<distance_type>::max)())
     {}
@@ -64,7 +64,7 @@
     }
 
 private:
- Value & m_value;
+ Value m_value;
     distance_type m_comp_dist;
 };
 


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