A couple of cleanups and fixes

This commit is contained in:
Jason Turner
2015-06-19 20:10:45 -06:00
parent f9860216c9
commit 646563eb3f
2 changed files with 3 additions and 2 deletions

View File

@@ -438,7 +438,7 @@ namespace chaiscript
/// Set the value of an object, by name. If the object
/// is not available in the current scope it is created
void add(const Boxed_Value &obj, const std::string &name)
void add(Boxed_Value obj, const std::string &name)
{
validate_object_name(name);
auto &stack = get_stack_data();

View File

@@ -316,9 +316,10 @@ namespace chaiscript
virtual ~Inplace_Fun_Call_AST_Node() {}
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) const CHAISCRIPT_OVERRIDE{
std::vector<Boxed_Value> params;
chaiscript::eval::detail::Function_Push_Pop fpp(t_ss);
std::vector<Boxed_Value> params;
params.reserve(this->children[1]->children.size());
for (const auto &child : this->children[1]->children) {
params.push_back(child->eval(t_ss));
}