diff options
author | Max Kellermann <max@duempel.org> | 2014-08-28 12:49:29 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-28 13:03:18 +0200 |
commit | 888ab0c89c154b4bb30b626734ce6a14c42a8ed5 (patch) | |
tree | c7fcfd27986983966b3639fa684c0fcdf36501c7 /src/db/plugins/simple/Song.cxx | |
parent | 2efd8ef52ddf880c26d48bcb55eb1fd4c830481a (diff) | |
download | mpd-888ab0c89c154b4bb30b626734ce6a14c42a8ed5.tar.gz mpd-888ab0c89c154b4bb30b626734ce6a14c42a8ed5.tar.xz mpd-888ab0c89c154b4bb30b626734ce6a14c42a8ed5.zip |
db/simple/Song: use std::chrono::duration for start_ms and end_ms
Diffstat (limited to 'src/db/plugins/simple/Song.cxx')
-rw-r--r-- | src/db/plugins/simple/Song.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/db/plugins/simple/Song.cxx b/src/db/plugins/simple/Song.cxx index ff7796b30..fbfc2ec19 100644 --- a/src/db/plugins/simple/Song.cxx +++ b/src/db/plugins/simple/Song.cxx @@ -30,7 +30,8 @@ #include <stdlib.h> inline Song::Song(const char *_uri, size_t uri_length, Directory &_parent) - :parent(&_parent), mtime(0), start_ms(0), end_ms(0) + :parent(&_parent), mtime(0), + start_time(SongTime::zero()), end_time(SongTime::zero()) { memcpy(uri, _uri, uri_length + 1); } @@ -59,8 +60,8 @@ Song::NewFrom(DetachedSong &&other, Directory &parent) Song *song = song_alloc(other.GetURI(), parent); song->tag = std::move(other.WritableTag()); song->mtime = other.GetLastModified(); - song->start_ms = other.GetStartTime().ToMS(); - song->end_ms = other.GetEndTime().ToMS(); + song->start_time = other.GetStartTime(); + song->end_time = other.GetEndTime(); return song; } @@ -105,7 +106,7 @@ Song::Export() const dest.real_uri = nullptr; dest.tag = &tag; dest.mtime = mtime; - dest.start_time = SongTime::FromMS(start_ms); - dest.end_time = SongTime::FromMS(end_ms); + dest.start_time = start_time; + dest.end_time = end_time; return dest; } |