diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-09-28 20:57:25 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-09-28 20:57:25 +0000 |
commit | 665704ba3ec1201c536c2ffa27a4d667eab3e12c (patch) | |
tree | 94cf8aafce99d2bb7c0b24a1ab3cde8e6a30cae1 /src/expr/node_value.h | |
parent | bad97d014fda8d06994067e18e90d0c96cff5bbf (diff) |
node iterator work
Diffstat (limited to 'src/expr/node_value.h')
-rw-r--r-- | src/expr/node_value.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/expr/node_value.h b/src/expr/node_value.h index 2b26b273d..e4fc479b7 100644 --- a/src/expr/node_value.h +++ b/src/expr/node_value.h @@ -162,7 +162,7 @@ private: return d_i != i.d_i; } - iterator operator++() { + iterator& operator++() { ++d_i; return *this; } @@ -187,12 +187,6 @@ public: template <typename T> inline iterator<T> end() const; - template <typename T, Kind kind> - inline iterator<T> begin() const; - - template <typename T, Kind kind> - inline iterator<T> end() const; - /** * Hash this NodeValue. For hash_maps, hash_sets, etc.. but this is * for expr package internal use only at present! This is likely to @@ -362,26 +356,6 @@ inline NodeValue::iterator<T> NodeValue::end() const { return iterator<T>(d_children + d_nchildren); } -template <typename T, Kind kind> -inline NodeValue::iterator<T> NodeValue::begin() const { - if(d_kind != kind) { - return iterator<T>(this); - } - NodeValue* const* firstChild = d_children; - if(getMetaKind() == kind::metakind::PARAMETERIZED) { - ++firstChild; - } - return iterator<T>(firstChild); -} - -template <typename T, Kind kind> -inline NodeValue::iterator<T> NodeValue::end() const { - if(d_kind != kind) { - return iterator<T>(this + 1); - } - return iterator<T>(d_children + d_nchildren); -} - inline bool NodeValue::isBeingDeleted() const { return NodeManager::currentNM() != NULL && NodeManager::currentNM()->isCurrentlyDeleting(this); |