[clang-tidy] use default member init

Found with modernize-use-default-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-03-17 20:52:46 -07:00
committed by Max Kellermann
parent d2115e908a
commit 7fe49cf24d
7 changed files with 13 additions and 16 deletions

View File

@@ -40,7 +40,7 @@ struct AsxParser {
*/
enum {
ROOT, ENTRY,
} state;
} state{ROOT};
/**
* The current tag within the "entry" element. This is only
@@ -56,8 +56,7 @@ struct AsxParser {
TagBuilder tag_builder;
AsxParser()
:state(ROOT) {}
AsxParser() = default;
};

View File

@@ -57,9 +57,9 @@ ParsePls(TextInputStream &is, std::forward_list<DetachedSong> &songs)
struct Entry {
std::string file, title;
int length;
int length{-1};
Entry():length(-1) {}
Entry() = default;
};
static constexpr unsigned MAX_ENTRIES = 65536;

View File

@@ -40,7 +40,7 @@ struct RssParser {
*/
enum {
ROOT, ITEM,
} state;
} state{ROOT};
/**
* The current tag within the "entry" element. This is only
@@ -57,8 +57,7 @@ struct RssParser {
TagBuilder tag_builder;
RssParser()
:state(ROOT) {}
RssParser() = default;
};
static void XMLCALL