Commit 424f478c authored by Max Kellermann's avatar Max Kellermann

TagBuilder: reserve items in move constructor

parent 5e0c2720
......@@ -46,6 +46,7 @@ TagBuilder::TagBuilder(Tag &&other)
/* move all TagItem pointers from the Tag object; we don't
need to contact the tag pool, because all we do is move
references */
items.reserve(other.num_items);
std::copy_n(other.items, other.num_items, std::back_inserter(items));
/* discard the pointers from the Tag object */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment