common.h: use emplace in vec_append

This commit is contained in:
Aaron Gyes 2021-12-20 22:54:59 -08:00
parent 9abbcc0ba6
commit ab353ce0e4

View File

@ -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()));
}
}