aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag/TagBuilder.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tag/TagBuilder.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tag/TagBuilder.cxx b/src/tag/TagBuilder.cxx
index bc8ea2ae7..85060e9ee 100644
--- a/src/tag/TagBuilder.cxx
+++ b/src/tag/TagBuilder.cxx
@@ -29,7 +29,7 @@
#include <stdlib.h>
TagBuilder::TagBuilder(const Tag &other)
- :time(other.time), has_playlist(other.has_playlist)
+ :duration(other.duration), has_playlist(other.has_playlist)
{
items.reserve(other.num_items);
@@ -40,7 +40,7 @@ TagBuilder::TagBuilder(const Tag &other)
}
TagBuilder::TagBuilder(Tag &&other)
- :time(other.time), has_playlist(other.has_playlist)
+ :duration(other.duration), has_playlist(other.has_playlist)
{
/* move all TagItem pointers from the Tag object; we don't
need to contact the tag pool, because all we do is move
@@ -58,7 +58,7 @@ TagBuilder &
TagBuilder::operator=(const TagBuilder &other)
{
/* copy all attributes */
- time = other.time;
+ duration = other.duration;
has_playlist = other.has_playlist;
items = other.items;
@@ -74,7 +74,7 @@ TagBuilder::operator=(const TagBuilder &other)
TagBuilder &
TagBuilder::operator=(TagBuilder &&other)
{
- time = other.time;
+ duration = other.duration;
has_playlist = other.has_playlist;
items = std::move(other.items);
@@ -84,7 +84,7 @@ TagBuilder::operator=(TagBuilder &&other)
TagBuilder &
TagBuilder::operator=(Tag &&other)
{
- time = other.time;
+ duration = other.duration;
has_playlist = other.has_playlist;
/* move all TagItem pointers from the Tag object; we don't
@@ -105,7 +105,7 @@ TagBuilder::operator=(Tag &&other)
void
TagBuilder::Clear()
{
- time = -1;
+ duration = SignedSongTime::Negative();
has_playlist = false;
RemoveAll();
}
@@ -115,7 +115,7 @@ TagBuilder::Commit(Tag &tag)
{
tag.Clear();
- tag.time = time;
+ tag.duration = duration;
tag.has_playlist = has_playlist;
/* move all TagItem pointers to the new Tag object without
@@ -162,8 +162,8 @@ TagBuilder::HasType(TagType type) const
void
TagBuilder::Complement(const Tag &other)
{
- if (time <= 0)
- time = other.time;
+ if (duration.IsNegative())
+ duration = other.duration;
has_playlist |= other.has_playlist;