db/LightSong: implicit initialization

This commit is contained in:
Max Kellermann
2018-07-06 16:50:37 +02:00
parent b9ff6383a4
commit 80cb680fca
3 changed files with 7 additions and 18 deletions

View File

@@ -42,7 +42,7 @@ struct LightSong {
* #uri. To build the full URI, join directory and uri with a
* slash.
*/
const char *directory;
const char *directory = nullptr;
const char *uri;
@@ -54,7 +54,7 @@ struct LightSong {
* This attribute is used for songs from the database which
* have a relative URI.
*/
const char *real_uri;
const char *real_uri = nullptr;
/**
* Metadata.
@@ -65,18 +65,18 @@ struct LightSong {
* 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();
explicit LightSong(const Tag &_tag) noexcept
:tag(_tag) {}