From ec54a5c72c92d20ca3fa69717ca4ab197ed8552b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 17 Jan 2018 10:57:06 +0100 Subject: [PATCH] CommandLine: use C++11 initializers --- src/CommandLine.cxx | 4 ---- src/CommandLine.hxx | 8 ++++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/CommandLine.cxx b/src/CommandLine.cxx index e418963ff..a9e1c56a0 100644 --- a/src/CommandLine.cxx +++ b/src/CommandLine.cxx @@ -306,10 +306,6 @@ void ParseCommandLine(int argc, char **argv, struct options *options) { bool use_config_file = true; - options->kill = false; - options->daemon = true; - options->log_stderr = false; - options->verbose = false; // First pass: handle command line options OptionParser parser(option_defs, argc, argv); diff --git a/src/CommandLine.hxx b/src/CommandLine.hxx index 594a5fb36..1f270d757 100644 --- a/src/CommandLine.hxx +++ b/src/CommandLine.hxx @@ -21,10 +21,10 @@ #define MPD_COMMAND_LINE_HXX struct options { - bool kill; - bool daemon; - bool log_stderr; - bool verbose; + bool kill = false; + bool daemon = true; + bool log_stderr = false; + bool verbose = false; }; void