From ac9a93261bf65d8392fafb646d843150c0688f91 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 7 Feb 2016 08:30:49 +0100 Subject: [PATCH] playlist/cue/CueParser: use C++11 initializers --- src/playlist/cue/CueParser.cxx | 7 ------- src/playlist/cue/CueParser.hxx | 11 +++++------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/playlist/cue/CueParser.cxx b/src/playlist/cue/CueParser.cxx index 81797fe28..25099152e 100644 --- a/src/playlist/cue/CueParser.cxx +++ b/src/playlist/cue/CueParser.cxx @@ -29,13 +29,6 @@ #include #include -CueParser::CueParser() - :state(HEADER), - current(nullptr), - previous(nullptr), - finished(nullptr), - end(false) {} - CueParser::~CueParser() { delete current; diff --git a/src/playlist/cue/CueParser.hxx b/src/playlist/cue/CueParser.hxx index 925f1234c..32c617d1a 100644 --- a/src/playlist/cue/CueParser.hxx +++ b/src/playlist/cue/CueParser.hxx @@ -55,7 +55,7 @@ class CueParser { * Ignore everything until the next "TRACK". */ IGNORE_TRACK, - } state; + } state = HEADER; /** * Tags read from the CUE header. @@ -74,29 +74,28 @@ class CueParser { /** * The song currently being edited. */ - DetachedSong *current; + DetachedSong *current = nullptr; /** * The previous song. It is remembered because its end_time * will be set to the current song's start time. */ - DetachedSong *previous; + DetachedSong *previous = nullptr; /** * A song that is completely finished and can be returned to * the caller via cue_parser_get(). */ - DetachedSong *finished; + DetachedSong *finished = nullptr; /** * Tracks whether cue_parser_finish() has been called. If * true, then all remaining (partial) results will be * delivered by cue_parser_get(). */ - bool end; + bool end = false; public: - CueParser(); ~CueParser(); /**