From 8905a0e25858a047e0844c55ed8a025153ab25d9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 4 Dec 2010 23:21:09 +0000 Subject: More const-correctness (remove all use of const_cast). git-svn-id: http://svn.drobilla.net/resp/resp@297 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/repl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/repl.cpp') diff --git a/src/repl.cpp b/src/repl.cpp index 7ef7ff3..4ea4d68 100644 --- a/src/repl.cpp +++ b/src/repl.cpp @@ -105,7 +105,7 @@ eval(CEnv& cenv, Cursor& cursor, istream& is, bool execute) for (Parsed::const_iterator i = parsed.begin(); i != parsed.end(); ++i) { const AST* l = resp_lift(cenv, lifted, *i); if (l) - lifted.push_back(const_cast(l)); + lifted.push_back(l); } if (cenv.args.find("-L") != cenv.args.end()) { @@ -122,7 +122,7 @@ eval(CEnv& cenv, Cursor& cursor, istream& is, bool execute) val = resp_compile(cenv, call); } else { assert(*i); - ATuple* tup = (*i)->to_tuple(); + const ATuple* tup = (*i)->to_tuple(); if (!tup || (tup->tup_len() > 0)) exprs.push_back(*i); } @@ -135,7 +135,7 @@ eval(CEnv& cenv, Cursor& cursor, istream& is, bool execute) f = cenv.engine()->startFunction(cenv, "main", new ATuple(cursor), fnT); // Compile expressions (other than function definitions) into it - for (list::const_iterator i = exprs.begin(); i != exprs.end(); ++i) + for (Code::const_iterator i = exprs.begin(); i != exprs.end(); ++i) val = resp_compile(cenv, *i); // Finish compilation -- cgit v1.2.1