summaryrefslogtreecommitdiff
path: root/src/expr/node_value.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-09-21 21:36:22 +0000
committerMorgan Deters <mdeters@gmail.com>2010-09-21 21:36:22 +0000
commitbfa08932b23b391fafbfc18eb8033a87e802f0e1 (patch)
treed1dcba0835f0634c98beb16cb428fe66a66fd534 /src/expr/node_value.h
parentea9346f840046ee20558afb2a17dd5999d45c5c9 (diff)
some code cleanup, documentation, review of "kinded-iterator" code, and addition of a unit test
Diffstat (limited to 'src/expr/node_value.h')
-rw-r--r--src/expr/node_value.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/expr/node_value.h b/src/expr/node_value.h
index 63121b981..2b26b273d 100644
--- a/src/expr/node_value.h
+++ b/src/expr/node_value.h
@@ -364,7 +364,9 @@ inline NodeValue::iterator<T> NodeValue::end() const {
template <typename T, Kind kind>
inline NodeValue::iterator<T> NodeValue::begin() const {
- if (d_kind != kind) return iterator<T>(this);
+ if(d_kind != kind) {
+ return iterator<T>(this);
+ }
NodeValue* const* firstChild = d_children;
if(getMetaKind() == kind::metakind::PARAMETERIZED) {
++firstChild;
@@ -374,7 +376,9 @@ inline NodeValue::iterator<T> NodeValue::begin() const {
template <typename T, Kind kind>
inline NodeValue::iterator<T> NodeValue::end() const {
- if (d_kind != kind) return iterator<T>(this + 1);
+ if(d_kind != kind) {
+ return iterator<T>(this + 1);
+ }
return iterator<T>(d_children + d_nchildren);
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback