diff options
Diffstat (limited to 'project2/variables.cpp')
-rw-r--r-- | project2/variables.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/project2/variables.cpp b/project2/variables.cpp index 516e187..70f51b8 100644 --- a/project2/variables.cpp +++ b/project2/variables.cpp @@ -166,13 +166,10 @@ class VariableParent : public VariableImplDyn { { try { if (!getValue) { - RowSet::RowValuesStack::const_reverse_iterator r = RowSet::Stack().rbegin(); - for (size_t p = depth; p--; r++) ; - if (r == RowSet::Stack().rend()) { + if (depth > RowState::Stack().size()) { throw RowSet::ParentOutOfRange(depth); } - ; - bind(*r); + bind(RowState::Stack()[RowState::Stack().size() - depth]); } return getValue(); } @@ -190,14 +187,13 @@ class VariableParent : public VariableImplDyn { } } protected: - void bind(ConstRowSetPtr row) const + void bind(const RowState * row) const { if (attr) { getValue = boost::bind(row->resolveAttr(name)); } else { - typedef VariableType (RowSet::*gCV)(const Glib::ustring &) const; - getValue = boost::bind((gCV)&RowSet::getCurrentValue, row, name); + getValue = boost::bind(&RowState::getCurrentValue, row, name); } } const size_t depth; |