From 12314c754187ae246bc38aceb827bf51d1669d73 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 25 Dec 2012 00:51:18 +0000 Subject: Use C++11 range-based for loops. git-svn-id: http://svn.drobilla.net/resp/trunk@444 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/cps.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/cps.cpp') diff --git a/src/cps.cpp b/src/cps.cpp index bb375a8..38dc27a 100644 --- a/src/cps.cpp +++ b/src/cps.cpp @@ -56,8 +56,8 @@ cps_fn(CEnv& cenv, const ATuple* fn, const AST* cont) const ASymbol* k2 = cenv.penv.gensym("__k"); List copyProt; - FOREACHP(ATuple::const_iterator, i, fn->prot()) - copyProt.push_back(*i); + for (const auto& i : *fn->prot()) + copyProt.push_back(i); copyProt.push_back(k2); assert(fn->fst()); @@ -81,11 +81,11 @@ cps_call(CEnv& cenv, const ATuple* call, const AST* k) typedef std::vector ExpVec; ExpVec exprs; ExpVec args; - FOREACHP(ATuple::const_iterator, i, call) { - exprs.push_back(*i); - if (is_value(cenv, *i)) { - body.push_back(*i); - args.push_back(*i); + for (const auto& i : *call) { + exprs.push_back(i); + if (is_value(cenv, i)) { + body.push_back(i); + args.push_back(i); } else { const ASymbol* sym = cenv.penv.gensym("__a"); body.push_back(sym); -- cgit v1.2.1