Cleanup in content_mapblock (#5746)
[oweals/minetest.git] / src / settings.h
index b19733514daed23e09a10b2742f8e21ae54c3874..8c4f6e559e05cfedc9f0c21953d947a6b9f80c69 100644 (file)
@@ -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;