mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 06:41:42 +08:00
common.h: use emplace in vec_append
This commit is contained in:
parent
9abbcc0ba6
commit
ab353ce0e4
|
@ -260,7 +260,7 @@ void vec_append(std::vector<T> &receiver, std::vector<T> &&donator) {
|
|||
if (receiver.empty()) {
|
||||
receiver = std::move(donator);
|
||||
} else {
|
||||
receiver.insert(receiver.end(), std::make_move_iterator(donator.begin()),
|
||||
receiver.emplace(receiver.end(), std::make_move_iterator(donator.begin()),
|
||||
std::make_move_iterator(donator.end()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user