config/Param: use C++11 initializers

This commit is contained in:
Max Kellermann 2018-07-17 20:22:38 +02:00
parent af33a9f4b8
commit bf046d895e
2 changed files with 4 additions and 4 deletions

View File

@ -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()
{

View File

@ -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);