From 1de68b72b9341a1a8a231db246367b9eaf2b0299 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 20 Jan 2018 19:39:06 +0100 Subject: [PATCH] tag/Tag: use C++11 initializers --- src/tag/Tag.hxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/tag/Tag.hxx b/src/tag/Tag.hxx index 624a92a35..be69017a8 100644 --- a/src/tag/Tag.hxx +++ b/src/tag/Tag.hxx @@ -37,25 +37,24 @@ struct Tag { * The duration of the song. A negative value means that the * length is unknown. */ - SignedSongTime duration; + SignedSongTime duration = SignedSongTime::Negative(); /** * Does this file have an embedded playlist (e.g. embedded CUE * sheet)? */ - bool has_playlist; + bool has_playlist = false; /** the total number of tag items in the #items array */ - unsigned short num_items; + unsigned short num_items = 0; /** an array of tag items */ - TagItem **items; + TagItem **items = nullptr; /** * Create an empty tag. */ - Tag():duration(SignedSongTime::Negative()), has_playlist(false), - num_items(0), items(nullptr) {} + Tag() = default; Tag(const Tag &other);