From c285c4d40b811b46b558cb89b00954e09a6fba11 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Sat, 31 Jan 2015 15:07:17 -0700 Subject: [PATCH] Reduce code in assignment oper eval --- include/chaiscript/language/chaiscript_eval.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/chaiscript/language/chaiscript_eval.hpp b/include/chaiscript/language/chaiscript_eval.hpp index 65d6b3d..174cdfa 100644 --- a/include/chaiscript/language/chaiscript_eval.hpp +++ b/include/chaiscript/language/chaiscript_eval.hpp @@ -482,7 +482,7 @@ namespace chaiscript } try { - rhs = t_ss.call_function(this->children[1]->text, std::move(lhs), rhs); + return t_ss.call_function(this->children[1]->text, std::move(lhs), rhs); } catch(const exception::dispatch_error &e){ throw exception::eval_error("Unable to find appropriate'" + this->children[1]->text + "' operator.", e.parameters, e.functions, false, t_ss); @@ -501,7 +501,7 @@ namespace chaiscript } else { try { - rhs = t_ss.call_function(this->children[1]->text, std::move(lhs), rhs); + return t_ss.call_function(this->children[1]->text, std::move(lhs), rhs); } catch(const exception::dispatch_error &e){ throw exception::eval_error("Unable to find appropriate'" + this->children[1]->text + "' operator.", e.parameters, e.functions, false, t_ss); }