diff options
Diffstat (limited to 'project2/if.cpp')
-rw-r--r-- | project2/if.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/project2/if.cpp b/project2/if.cpp index 9d367bf..8fc210d 100644 --- a/project2/if.cpp +++ b/project2/if.cpp @@ -18,16 +18,16 @@ bool IfSet::passes() const { if (mode == And) { - BOOST_FOREACH(OrderedParamCheckers::value_type pc, checks) { - if (!pc.second->performCheck()) { + BOOST_FOREACH(const ParamCheckers::value_type & pc, checks.get<bySOOrder>()) { + if (!pc->performCheck()) { return false; } } return true; } else { - BOOST_FOREACH(OrderedParamCheckers::value_type pc, checks) { - if (pc.second->performCheck()) { + BOOST_FOREACH(const ParamCheckers::value_type & pc, checks.get<bySOOrder>()) { + if (pc->performCheck()) { return true; } } @@ -52,8 +52,8 @@ void If::execute(const Presenter * presenter) const { if (passes()) { Logger()->messagef(LOG_DEBUG, "IfSet passed, showing %zu views", subViews.size()); - BOOST_FOREACH(Views::value_type sq, subViews) { - sq.second->execute(presenter); + BOOST_FOREACH(const Views::value_type & sq, subViews) { + sq->execute(presenter); } } } @@ -62,8 +62,8 @@ void If::execute() const { if (passes()) { Logger()->message(LOG_DEBUG, "IfSet passed"); - BOOST_FOREACH(NoOutputExecutes::value_type sq, subNOEs) { - sq.second->execute(); + BOOST_FOREACH(const NoOutputExecutes::value_type & sq, subNOEs.get<bySOOrder>()) { + sq->execute(); } } } |