Commit bf046d89 authored by Max Kellermann's avatar Max Kellermann

config/Param: use C++11 initializers

parent af33a9f4
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <stdexcept> #include <stdexcept>
ConfigParam::ConfigParam(const char *_value, int _line) ConfigParam::ConfigParam(const char *_value, int _line)
:next(nullptr), value(_value), line(_line), used(false) {} :value(_value), line(_line) {}
ConfigParam::~ConfigParam() ConfigParam::~ConfigParam()
{ {
......
...@@ -32,7 +32,7 @@ struct ConfigParam { ...@@ -32,7 +32,7 @@ struct ConfigParam {
* The next ConfigParam with the same name. The destructor * The next ConfigParam with the same name. The destructor
* deletes the whole chain. * deletes the whole chain.
*/ */
ConfigParam *next; ConfigParam *next = nullptr;
std::string value; std::string value;
...@@ -42,10 +42,10 @@ struct ConfigParam { ...@@ -42,10 +42,10 @@ struct ConfigParam {
* This flag is false when nobody has queried the value of * This flag is false when nobody has queried the value of
* this option yet. * this option yet.
*/ */
bool used; bool used = false;
explicit ConfigParam(int _line=-1) explicit ConfigParam(int _line=-1)
:next(nullptr), line(_line), used(false) {} :line(_line) {}
gcc_nonnull_all gcc_nonnull_all
ConfigParam(const char *_value, int _line=-1); ConfigParam(const char *_value, int _line=-1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment