From 5afe88df2538274859a162ffd63ed52118e80c19 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Fri, 26 Jan 2024 16:07:54 +0100 Subject: Apply C++11 fixits modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using --- src/configuration.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/configuration.h') 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 *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 Options; + using Options = std::map; Options mOptions; - typedef std::list ConfigurationList; + using ConfigurationList = std::list; std::map 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)); } -- cgit v1.2.3-70-g09d2