aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-03 12:59:32 +0100
committerMax Kellermann <max@duempel.org>2013-12-03 12:59:32 +0100
commit424f478c3f6760023ff67ca4facc424787be5a0d (patch)
tree04dda2e28bd343e48db74a6801f10b674cbd8d28 /src/tag
parent5e0c27206182e2f0d5acc63aad2f915970131e2b (diff)
downloadmpd-424f478c3f6760023ff67ca4facc424787be5a0d.tar.gz
mpd-424f478c3f6760023ff67ca4facc424787be5a0d.tar.xz
mpd-424f478c3f6760023ff67ca4facc424787be5a0d.zip
TagBuilder: reserve items in move constructor
Diffstat (limited to 'src/tag')
-rw-r--r--src/tag/TagBuilder.cxx1
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 */