summaryrefslogtreecommitdiff
path: root/src/configuration.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-31 01:34:38 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-31 01:34:38 +0300
commite826d4c63365dde4c988453846437dcb65370945 (patch)
tree1bd23d4694c06d97e7e8c885253c0100fe6142b9 /src/configuration.h
parent75ca03c95c90064e67fa9eaddb4c609196dd3a27 (diff)
downloadplus-e826d4c63365dde4c988453846437dcb65370945.tar.gz
plus-e826d4c63365dde4c988453846437dcb65370945.tar.bz2
plus-e826d4c63365dde4c988453846437dcb65370945.tar.xz
plus-e826d4c63365dde4c988453846437dcb65370945.zip
Improve setting default values for configuration objects.
Diffstat (limited to 'src/configuration.h')
-rw-r--r--src/configuration.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/configuration.h b/src/configuration.h
index 2556ac283..fa3e0ec19 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -255,14 +255,7 @@ class Configuration final : public ConfigurationObject
void unload();
- /**
- * Set the default values for each keys.
- *
- * @param defaultsData data used as defaults.
- */
- void setDefaultValues(DefaultsData *const defaultsData);
-
- DefaultsData *getDefaultValues()
+ DefaultsData &getDefaultValues()
{ return mDefaultsData; }
/**
@@ -365,12 +358,12 @@ class Configuration final : public ConfigurationObject
void writeUpdated();
- private:
/**
* Clean up the default values member.
*/
void cleanDefaults();
+ private:
typedef std::list<ConfigListener*> Listeners;
typedef Listeners::iterator ListenerIterator;
typedef std::map<std::string, Listeners> ListenerMap;
@@ -380,7 +373,7 @@ class Configuration final : public ConfigurationObject
// Location of config file
std::string mConfigPath;
/// Defaults of value for a given key
- DefaultsData *mDefaultsData;
+ DefaultsData mDefaultsData;
std::string mDirectory;
std::string mFilename;
UseVirtFs mUseResManager;