Boost logo

Boost-Commit :

From: mariano.consoni_at_[hidden]
Date: 2008-07-02 11:29:06


Author: mconsoni
Date: 2008-07-02 11:29:05 EDT (Wed, 02 Jul 2008)
New Revision: 46988
URL: http://svn.boost.org/trac/boost/changeset/46988

Log:
- some code cleanups.

Text files modified:
   sandbox/SOC/2008/spacial_indexing/boost/spatial_index/quadtree_node.hpp | 2 +-
   sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree_leaf.hpp | 13 +++----------
   2 files changed, 4 insertions(+), 11 deletions(-)

Modified: sandbox/SOC/2008/spacial_indexing/boost/spatial_index/quadtree_node.hpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/boost/spatial_index/quadtree_node.hpp (original)
+++ sandbox/SOC/2008/spacial_indexing/boost/spatial_index/quadtree_node.hpp 2008-07-02 11:29:05 EDT (Wed, 02 Jul 2008)
@@ -341,7 +341,7 @@
     std::cerr << "--------------------------------------" << std::endl;
     std::cerr << " [ ";
     for(typename std::map<Point,Value>::const_iterator it = m_.begin(); it != m_.end(); ++it) {
- std::cerr << it->second << " ";
+// std::cerr << it->second << " ";
     }
     std::cerr << " ] " << std::endl;;
 

Modified: sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree_leaf.hpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree_leaf.hpp (original)
+++ sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree_leaf.hpp 2008-07-02 11:29:05 EDT (Wed, 02 Jul 2008)
@@ -24,9 +24,9 @@
     typedef std::vector< std::pair< geometry::box<Point>, Value > > leaves_map;
 
   public:
- rtree_leaf(void) : level_(0) {}
+ rtree_leaf(void) {}
     rtree_leaf(const boost::shared_ptr< rtree_node<Point,Value> > &parent)
- : rtree_node<Point,Value>(parent, 0), level_(0) {}
+ : rtree_node<Point,Value>(parent, 0) {}
 
     /// query method
     virtual void find(const geometry::box<Point> &e, std::deque<Value> &r, const bool exact_match)
@@ -90,10 +90,6 @@
       nodes_.push_back(std::make_pair(b, v));
     }
 
- virtual void empty_nodes(void) {
- nodes_.clear();
- }
-
     virtual Value get_value(const unsigned int i) const { return nodes_[i].second; }
 
     /// box projector for leaf
@@ -111,7 +107,7 @@
           return;
         }
       }
- std::cerr << "remove: node not found" << std::endl;
+ throw std::logic_error("Node not found.");
     }
 
 
@@ -142,9 +138,6 @@
 
   private:
 
- // level of this node
- unsigned int level_;
-
     leaves_map nodes_;
   };
 


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