mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 19:41:15 -03:00
remove make_pair
There are better alternatives with C++11. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Fabian Homborg
parent
5e46ad645a
commit
a00ebc65af
@@ -682,9 +682,9 @@ std::shared_ptr<owning_null_terminated_array_t> env_scoped_impl_t::create_export
|
||||
assert(var && "Variable should be present in uvars");
|
||||
// Note that std::map::insert does NOT overwrite a value already in the map,
|
||||
// which we depend on here.
|
||||
// Note: Using std::move around make_pair prevents the compiler from implementing
|
||||
// Note: Using std::move around emplace prevents the compiler from implementing
|
||||
// copy elision.
|
||||
vals.insert(std::make_pair(key, std::move(*var)));
|
||||
vals.emplace(key, std::move(*var));
|
||||
}
|
||||
|
||||
// Dorky way to add our single exported computed variable.
|
||||
|
||||
Reference in New Issue
Block a user