Skip to content

Commit 76be103

Browse files
authoredJun 16, 2017
C++11 patchset 9: move hardcoded init parameters to class definitions (part 1) (#5984)
* C++11 patchset 9: move hardcoded init parameters to class definitions C++11 introduced the possibility to define the default values directly in class definitions, do it on current code Also remove some unused attributes * CollisionInfo::bouncy * collisionMoveResult::collides_xy * collisionMoveResult::standing_on_unloaded * Clouds::speed * More constructor cleanups + some variables removal * remove only write guiFormSpecMenu::m_old_tooltip * move header included inside defintions in genericobject.h * remove some unused since years exception classes * remove unused & empty debug_stacks_init * remove unused & empty content_nodemeta_serialize_legacy * remove forgotten useless bool (bouncy) in collision.cpp code
1 parent 49d6e5f commit 76be103

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+331
-751
lines changed
 

Diff for: ‎src/ban.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2828
#include "filesys.h"
2929

3030
BanManager::BanManager(const std::string &banfilepath):
31-
m_banfilepath(banfilepath),
32-
m_modified(false)
31+
m_banfilepath(banfilepath)
3332
{
34-
try{
33+
try {
3534
load();
36-
}
37-
catch(SerializationError &e)
38-
{
35+
} catch(SerializationError &e) {
3936
warningstream<<"BanManager: creating "
4037
<<m_banfilepath<<std::endl;
4138
}

Diff for: ‎src/ban.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ class BanManager
4444

4545
private:
4646
std::mutex m_mutex;
47-
std::string m_banfilepath;
47+
std::string m_banfilepath = "";
4848
StringMap m_ips;
49-
bool m_modified;
49+
bool m_modified = false;
5050
};
5151

5252
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.