Changeset 2724
- Timestamp:
- Nov 19, 2009, 10:52:45 AM (15 years ago)
- Location:
- trunk/source
- Files:
-
- 2 edited
-
headers/geos/index/strtree/AbstractNode.h (modified) (1 diff)
-
index/strtree/AbstractNode.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/headers/geos/index/strtree/AbstractNode.h
r2556 r2724 38 38 class GEOS_DLL AbstractNode: public Boundable { 39 39 private: 40 std::vector<Boundable*> *childBoundables;40 std::vector<Boundable*> childBoundables; 41 41 int level; 42 42 public: 43 43 AbstractNode(int newLevel, int capacity=10); 44 44 virtual ~AbstractNode(); 45 46 // TODO: change signature to return by ref, 47 // document ownership of the return 45 48 inline std::vector<Boundable*>* getChildBoundables() { 46 return childBoundables;49 return &childBoundables; 47 50 } 48 51 52 // TODO: change signature to return by ref, 53 // document ownership of the return 49 54 inline const std::vector<Boundable*>* getChildBoundables() const { 50 return childBoundables;55 return &childBoundables; 51 56 } 52 57 -
trunk/source/index/strtree/AbstractNode.cpp
r1971 r2724 32 32 */ 33 33 AbstractNode::AbstractNode(int newLevel, int capacity) { 34 childBoundables=new std::vector<Boundable*>(); 35 childBoundables->reserve(capacity); 34 childBoundables.reserve(capacity); 36 35 bounds=NULL; 37 36 level=newLevel; … … 39 38 40 39 AbstractNode::~AbstractNode() { 41 delete childBoundables;42 40 } 43 44 /**45 * Returns either child AbstractNodes, or if this is a leaf node, real data (wrapped46 * in ItemBoundables).47 */48 //vector<Boundable*>* AbstractNode::getChildBoundables() {49 //return childBoundables;50 //}51 41 52 42 const void * … … 73 63 void AbstractNode::addChildBoundable(Boundable *childBoundable) { 74 64 assert(bounds==NULL); 75 childBoundables ->push_back(childBoundable);65 childBoundables.push_back(childBoundable); 76 66 } 77 67
Note:
See TracChangeset
for help on using the changeset viewer.
