From 72437ca9e2279855df5d2169c82df3524eaa3823 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 6 Jul 2018 17:03:31 +0200 Subject: [PATCH] db/simple/Song: use C++11 initializers --- src/db/plugins/simple/Song.cxx | 3 +-- src/db/plugins/simple/Song.hxx | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/db/plugins/simple/Song.cxx b/src/db/plugins/simple/Song.cxx index fdac83eed..61ed929df 100644 --- a/src/db/plugins/simple/Song.cxx +++ b/src/db/plugins/simple/Song.cxx @@ -29,8 +29,7 @@ #include inline Song::Song(const char *_uri, size_t uri_length, Directory &_parent) - :parent(&_parent), mtime(std::chrono::system_clock::time_point::min()), - start_time(SongTime::zero()), end_time(SongTime::zero()) + :parent(&_parent) { memcpy(uri, _uri, uri_length + 1); } diff --git a/src/db/plugins/simple/Song.hxx b/src/db/plugins/simple/Song.hxx index e6f0d3758..5b27958f4 100644 --- a/src/db/plugins/simple/Song.hxx +++ b/src/db/plugins/simple/Song.hxx @@ -74,18 +74,19 @@ struct Song { * The time stamp of the last file modification. A negative * value means that this is unknown/unavailable. */ - std::chrono::system_clock::time_point mtime; + std::chrono::system_clock::time_point mtime = + std::chrono::system_clock::time_point::min(); /** * Start of this sub-song within the file. */ - SongTime start_time; + SongTime start_time = SongTime::zero(); /** * End of this sub-song within the file. * Unused if zero. */ - SongTime end_time; + SongTime end_time = SongTime::zero(); /** * The file name.