Fix vector element assignment issues

This commit is contained in:
Jason Turner
2015-10-15 21:20:12 -06:00
parent b11ebf9e8f
commit 36765df3c0
5 changed files with 17 additions and 13 deletions

View File

@@ -1031,13 +1031,7 @@ namespace chaiscript
uint_fast32_t loc = t_loc.load(std::memory_order_relaxed);
const auto funs = get_function(t_name, loc);
if (funs.first != loc) t_loc.store(uint_fast32_t(funs.first), std::memory_order_relaxed);
Boxed_Value bv = dispatch::dispatch(*funs.second, params, m_conversions);
// the result of a clone is never to be marked as a return_value
// \todo see if we can eliminate this comparison
if (t_name == "clone") {
bv.reset_return_value();
}
return bv;
return dispatch::dispatch(*funs.second, params, m_conversions);
}