diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-26 16:07:54 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-26 16:07:54 +0100 |
commit | 5afe88df2538274859a162ffd63ed52118e80c19 (patch) | |
tree | b610dfd58dc748fd63f49565b2a43eea2316714f /src/configuration.h | |
parent | 73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff) | |
download | mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.gz mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.bz2 mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.xz mana-5afe88df2538274859a162ffd63ed52118e80c19.zip |
Apply C++11 fixits
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
Diffstat (limited to 'src/configuration.h')
-rw-r--r-- | src/configuration.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/configuration.h b/src/configuration.h index 16ee6236..49ea7c20 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -126,7 +126,7 @@ class ConfigurationObject void setList(const std::string &name, IT begin, IT end, ConfigurationListManager<T, CONT> *manager) { - ConfigurationObject *nextobj = new ConfigurationObject; + auto *nextobj = new ConfigurationObject; deleteList(name); ConfigurationList *list = &(mContainerOptions[name]); @@ -177,10 +177,10 @@ class ConfigurationObject void deleteList(const std::string &name); - typedef std::map<std::string, std::string> Options; + using Options = std::map<std::string, std::string>; Options mOptions; - typedef std::list<ConfigurationObject *> ConfigurationList; + using ConfigurationList = std::list<ConfigurationObject *>; std::map<std::string, ConfigurationList> mContainerOptions; }; @@ -192,9 +192,9 @@ class ConfigurationObject class Configuration : public ConfigurationObject { public: - Configuration() : mDefaultsData(0) {} + Configuration() : mDefaultsData(nullptr) {} - ~Configuration(); + ~Configuration() override; /** * Reads config file and parse all options into memory. @@ -216,7 +216,7 @@ class Configuration : public ConfigurationObject */ void write(); - void setValue(const std::string &key, const std::string &value); + void setValue(const std::string &key, const std::string &value) override; void setValue(const std::string &key, const char *value) { setValue(key, std::string(value)); } |