mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-02-09 11:16:48 +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);
|
throw chaiscript::exception::name_conflict_error(t_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
stack_elem.emplace_back(t_name, std::move(obj));
|
return stack_elem.emplace_back(t_name, std::move(obj)).second;
|
||||||
return stack_elem.back().second;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user