|
Boost-Commit : |
From: chintanraoh_at_[hidden]
Date: 2008-06-10 12:51:09
Author: chintanraoh
Date: 2008-06-10 12:51:08 EDT (Tue, 10 Jun 2008)
New Revision: 46298
URL: http://svn.boost.org/trac/boost/changeset/46298
Log:
Added comment about find()
Text files modified:
sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/node_cursor.hpp | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
Modified: sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/node_cursor.hpp
==============================================================================
--- sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/node_cursor.hpp (original)
+++ sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/node_cursor.hpp 2008-06-10 12:51:08 EDT (Tue, 10 Jun 2008)
@@ -60,7 +60,7 @@
trie_cursor(Node* const &n_ptr,const node_iterator &it): only_root(0), top(false)
{
- cur=const_cast<Node *>(n_ptr);
+ cur=(n_ptr);
pos=it;
}
@@ -117,6 +117,14 @@
return cur;
return *pos;
}
+
+ //returns const_iterator for const_cursor :(
+ //used by trie erase function
+ node_iterator get_iterator() const
+ {
+ assert(!only_root);
+ return pos;
+ }
void increment()
{
@@ -166,6 +174,7 @@
return cur->get_element(pos);
}
+ //const_cast here? trouble is only with const_cursor as get_node()=*pos = const Node *:(.
cursor find(const element_type &e) const
{
return cursor(this->get_node(),get_node()->find(e));
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