summaryrefslogtreecommitdiff
path: root/src/settings.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-04-21 10:06:08 +0200
committerGitHub <noreply@github.com>2017-04-21 10:06:08 +0200
commit370354cc87937bbfb6f24aa062966af8e039cec0 (patch)
treee0400c3b3c63d3e8e8b22c81e40a9cabe2d1b5b1 /src/settings.h
parentde5ecc9fa31d557e2d0ca638b1c98435707046b9 (diff)
downloadminetest-370354cc87937bbfb6f24aa062966af8e039cec0.tar.gz
minetest-370354cc87937bbfb6f24aa062966af8e039cec0.tar.bz2
minetest-370354cc87937bbfb6f24aa062966af8e039cec0.zip
Fix various performance issues reported by cppcheck (#5628)
* Also remove 1 non declared but defined functions
Diffstat (limited to 'src/settings.h')
-rw-r--r--src/settings.h33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/settings.h b/src/settings.h
index 777d0eff5..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;