diff options
Diffstat (limited to 'src/settings.h')
-rw-r--r-- | src/settings.h | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/src/settings.h b/src/settings.h index 777d0eff5..a19c15a76 100644 --- a/src/settings.h +++ b/src/settings.h @@ -74,24 +74,21 @@ struct ValueSpec { }; struct SettingsEntry { - SettingsEntry() - { - group = NULL; - is_group = false; - } - - SettingsEntry(const std::string &value_) - { - value = value_; - group = NULL; - is_group = false; - } - - SettingsEntry(Settings *group_) - { - group = group_; - is_group = true; - } + SettingsEntry() : + group(NULL), + is_group(false) + {} + + SettingsEntry(const std::string &value_) : + value(value_), + group(NULL), + is_group(false) + {} + + SettingsEntry(Settings *group_) : + group(group_), + is_group(true) + {} std::string value; Settings *group; @@ -138,8 +135,10 @@ public: ***********/ const SettingsEntry &getEntry(const std::string &name) const; + const SettingsEntry &getEntryDefault(const std::string &name) const; Settings *getGroup(const std::string &name) const; const std::string &get(const std::string &name) const; + const std::string &getDefault(const std::string &name) const; bool getBool(const std::string &name) const; u16 getU16(const std::string &name) const; s16 getS16(const std::string &name) const; @@ -168,8 +167,10 @@ public: ***************************************/ bool getEntryNoEx(const std::string &name, SettingsEntry &val) const; + bool getEntryDefaultNoEx(const std::string &name, SettingsEntry &val) const; bool getGroupNoEx(const std::string &name, Settings *&val) const; bool getNoEx(const std::string &name, std::string &val) const; + bool getDefaultNoEx(const std::string &name, std::string &val) const; bool getFlag(const std::string &name) const; bool getU16NoEx(const std::string &name, u16 &val) const; bool getS16NoEx(const std::string &name, s16 &val) const; |