Reduce shared_ptr copies during dispatch

This commit is contained in:
Jason Turner
2016-05-03 08:51:44 -06:00
parent 9a526bc1ec
commit 17821be1e2
2 changed files with 3 additions and 3 deletions

View File

@@ -244,7 +244,7 @@ namespace chaiscript
Boxed_Value fn(this->children[0]->eval(t_ss));
try {
return (*t_ss->boxed_cast<const Const_Proxy_Function &>(fn))(params, t_ss.conversions());
return (*t_ss->boxed_cast<const dispatch::Proxy_Function_Base *>(fn))(params, t_ss.conversions());
}
catch(const exception::dispatch_error &e){
throw exception::eval_error(std::string(e.what()) + " with function '" + this->children[0]->text + "'", e.parameters, e.functions, false, *t_ss);