mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-01-01 03:12:23 +08:00
Use C++17's emplace_back return reference
This commit is contained in:
parent
e49df4c54d
commit
04902f8209
@ -516,8 +516,7 @@ namespace chaiscript
|
||||
throw chaiscript::exception::name_conflict_error(t_name);
|
||||
}
|
||||
|
||||
stack_elem.emplace_back(t_name, std::move(obj));
|
||||
return stack_elem.back().second;
|
||||
return stack_elem.emplace_back(t_name, std::move(obj)).second;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user