Commit 96875921 authored by Max Kellermann's avatar Max Kellermann

tag/Builder: use std::swap() in move operator

This way, we save the overhead for acquiring the tag_pool_lock.
parent 551c941b
......@@ -78,11 +78,14 @@ TagBuilder::operator=(const TagBuilder &other) noexcept
TagBuilder &
TagBuilder::operator=(TagBuilder &&other) noexcept
{
using std::swap;
duration = other.duration;
has_playlist = other.has_playlist;
RemoveAll();
items = std::move(other.items);
/* swap the two TagItem lists so we don't need to touch the
tag pool just yet */
swap(items, other.items);
return *this;
}
......
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