Eliminate extra unneeded scope

This commit is contained in:
Jason Turner
2015-08-28 21:19:00 -06:00
parent e21c8f87b4
commit 9f362608b7
2 changed files with 13 additions and 7 deletions

View File

@@ -12,10 +12,15 @@ for( var i = 0; i < 200000; ++i)
test_str.erase_at(1);
test_str.erase_at(1);
test_str.erase_at(1);
test_str.erase_at(1);
test_str.erase_at(1);
test_str.erase_at(1);
test_str.erase_at(1);
test_str.erase_at(1);
size(test_str);
// test_str.find("a", i);
c_str(test_str);
erase_at(test_str, 1);
erase_at(test_str, 1);
erase_at(test_str, 1);
erase_at(test_str, 1);
erase_at(test_str, 1);
erase_at(test_str, 1);
test_str = "bob was a string";
}

View File

@@ -60,7 +60,6 @@ namespace chaiscript
chaiscript::eval::detail::Stack_Push_Pop tpp(state);
if (thisobj) state.add_object("this", *thisobj);
chaiscript::eval::detail::Scope_Push_Pop spp(state);
if (t_locals) {
for (const auto &local : *t_locals) {
@@ -69,7 +68,9 @@ namespace chaiscript
}
for (size_t i = 0; i < t_param_names.size(); ++i) {
state.add_object(t_param_names[i], t_vals[i]);
if (t_param_names[i] != "this") {
state.add_object(t_param_names[i], t_vals[i]);
}
}
try {