diff options
author | Max Kellermann <max@musicpd.org> | 2018-07-17 20:22:38 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-07-17 20:27:47 +0200 |
commit | bf046d895e7780c312731d0b7c64325353ea4def (patch) | |
tree | 18ffd80972aa3576fce57a7665b72333de3027cb /src/config | |
parent | af33a9f4b8d656cd403ec9a087a436ad7bf3a594 (diff) |
config/Param: use C++11 initializers
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/Param.cxx | 2 | ||||
-rw-r--r-- | src/config/Param.hxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/config/Param.cxx b/src/config/Param.cxx index 175cb49af..a14d18524 100644 --- a/src/config/Param.cxx +++ b/src/config/Param.cxx @@ -26,7 +26,7 @@ #include <stdexcept> ConfigParam::ConfigParam(const char *_value, int _line) - :next(nullptr), value(_value), line(_line), used(false) {} + :value(_value), line(_line) {} ConfigParam::~ConfigParam() { diff --git a/src/config/Param.hxx b/src/config/Param.hxx index 50c514a19..744583b8b 100644 --- a/src/config/Param.hxx +++ b/src/config/Param.hxx @@ -32,7 +32,7 @@ struct ConfigParam { * The next ConfigParam with the same name. The destructor * deletes the whole chain. */ - ConfigParam *next; + ConfigParam *next = nullptr; std::string value; @@ -42,10 +42,10 @@ struct ConfigParam { * This flag is false when nobody has queried the value of * this option yet. */ - bool used; + bool used = false; explicit ConfigParam(int _line=-1) - :next(nullptr), line(_line), used(false) {} + :line(_line) {} gcc_nonnull_all ConfigParam(const char *_value, int _line=-1); |