using copy construction

This commit is contained in:
Andreas Reischuck
2015-03-22 00:23:49 +01:00
parent d0e763d77e
commit 4e614729dc

View File

@@ -788,8 +788,7 @@ namespace chaiscript
catch(chaiscript::exception::dispatch_error&) { catch(chaiscript::exception::dispatch_error&) {
auto functions = get_function("method_missing"); auto functions = get_function("method_missing");
if (!functions.empty()) { if (!functions.empty()) {
std::vector<Boxed_Value> tmp_params; std::vector<Boxed_Value> tmp_params(params);
tmp_params.insert(tmp_params.end(), params.begin(), params.end());
tmp_params.push_back(var(t_name)); tmp_params.push_back(var(t_name));
return dispatch::dispatch(functions, tmp_params, m_conversions); return dispatch::dispatch(functions, tmp_params, m_conversions);
} }