diff options
author | Max Kellermann <max@duempel.org> | 2013-12-03 12:59:32 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-12-03 12:59:32 +0100 |
commit | 424f478c3f6760023ff67ca4facc424787be5a0d (patch) | |
tree | 04dda2e28bd343e48db74a6801f10b674cbd8d28 /src/tag | |
parent | 5e0c27206182e2f0d5acc63aad2f915970131e2b (diff) | |
download | mpd-424f478c3f6760023ff67ca4facc424787be5a0d.tar.gz mpd-424f478c3f6760023ff67ca4facc424787be5a0d.tar.xz mpd-424f478c3f6760023ff67ca4facc424787be5a0d.zip |
TagBuilder: reserve items in move constructor
Diffstat (limited to '')
-rw-r--r-- | src/tag/TagBuilder.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tag/TagBuilder.cxx b/src/tag/TagBuilder.cxx index b114e882b..47921f248 100644 --- a/src/tag/TagBuilder.cxx +++ b/src/tag/TagBuilder.cxx @@ -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 */ |