diff --git a/main/kernel/Configuration.hpp b/main/kernel/Configuration.hpp index 2470518c..4098765f 100644 --- a/main/kernel/Configuration.hpp +++ b/main/kernel/Configuration.hpp @@ -184,22 +184,19 @@ class Property : public ConfigurationEntry { Property(ConfigurationSection* parent, const String& name, const T& defaultValue = T(), const bool secret = false) : name(name) , secret(secret) + , value(defaultValue) , defaultValue(defaultValue) { parent->add(*this); } - void set(const T& value) { - this->value = value; - configured = true; - } - const T& get() const { return configured ? value : defaultValue; } void load(const JsonObject& json) override { if (json[name].is()) { - set(json[name].as()); + value = json[name].as(); + configured = true; } else { reset(); } @@ -241,10 +238,6 @@ class ArrayProperty : public ConfigurationEntry { parent->add(*this); } - void set(const std::list& entries) { - this->entries = entries; - } - const std::list& get() const { return entries; }