summaryrefslogtreecommitdiff
path: root/src/settings.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.h')
-rw-r--r--src/settings.h37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/settings.h b/src/settings.h
index b19733514..8c4f6e559 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;
@@ -129,8 +126,6 @@ public:
static bool checkNameValid(const std::string &name);
static bool checkValueValid(const std::string &value);
- static std::string sanitizeName(const std::string &name);
- static std::string sanitizeValue(const std::string &value);
static std::string getMultiline(std::istream &is, size_t *num_lines=NULL);
static void printEntry(std::ostream &os, const std::string &name,
const SettingsEntry &entry, u32 tab_depth=0);
@@ -141,7 +136,7 @@ public:
const SettingsEntry &getEntry(const std::string &name) const;
Settings *getGroup(const std::string &name) const;
- std::string get(const std::string &name) const;
+ const std::string &get(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;