diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-04-25 10:17:53 +0200 |
---|---|---|
committer | Loïc Blot <loic.blot@unix-experience.fr> | 2017-04-25 10:21:42 +0200 |
commit | a7e131f53e211ffbe38d34d23b33e13cc401f013 (patch) | |
tree | c615160a94df851752d62bfc2a4cf9f4d01f63ab /src/map_settings_manager.cpp | |
parent | af9630962134346750f12c9f1856eae00e0dfe02 (diff) | |
download | minetest-a7e131f53e211ffbe38d34d23b33e13cc401f013.tar.gz minetest-a7e131f53e211ffbe38d34d23b33e13cc401f013.tar.bz2 minetest-a7e131f53e211ffbe38d34d23b33e13cc401f013.zip |
Fix various points reported by cppcheck (#5656)
* Fix various performance issues reported by cppcheck + code style (CI)
* Make CI happy with code style on master
* guiFileSelectMenu: remove useless includes
* some performance fixes pointed by cppcheck
* remove some useless casts
* TextDest: remove unused setFormSpec function
* Fix various iterator post-increment reported by cppcheck
Diffstat (limited to 'src/map_settings_manager.cpp')
-rw-r--r-- | src/map_settings_manager.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/map_settings_manager.cpp b/src/map_settings_manager.cpp index 53d17125c..52f88778c 100644 --- a/src/map_settings_manager.cpp +++ b/src/map_settings_manager.cpp @@ -25,14 +25,13 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "map_settings_manager.h" -MapSettingsManager::MapSettingsManager( - Settings *user_settings, const std::string &map_meta_path) +MapSettingsManager::MapSettingsManager(Settings *user_settings, + const std::string &map_meta_path): + mapgen_params(NULL), + m_map_meta_path(map_meta_path), + m_map_settings(new Settings()), + m_user_settings(user_settings) { - m_map_meta_path = map_meta_path; - m_user_settings = user_settings; - m_map_settings = new Settings; - mapgen_params = NULL; - assert(m_user_settings != NULL); } |