From 4a5e8ad343079f6552fab639770e5771ed7c4e7a Mon Sep 17 00:00:00 2001 From: Vincent Glize Date: Mon, 19 Jun 2017 23:54:58 +0200 Subject: C++11 cleanup on constructors (#6000) * C++11 cleanup on constructors dir script --- src/unittest/test_connection.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/unittest/test_connection.cpp') diff --git a/src/unittest/test_connection.cpp b/src/unittest/test_connection.cpp index d63322d69..3ea3d7444 100644 --- a/src/unittest/test_connection.cpp +++ b/src/unittest/test_connection.cpp @@ -53,12 +53,7 @@ void TestConnection::runTests(IGameDef *gamedef) struct Handler : public con::PeerHandler { - Handler(const char *a_name) - { - count = 0; - last_id = 0; - name = a_name; - } + Handler(const char *a_name) : name(a_name) {} void peerAdded(con::Peer *peer) { @@ -76,8 +71,8 @@ struct Handler : public con::PeerHandler count--; } - s32 count; - u16 last_id; + s32 count = 0; + u16 last_id = 0; const char *name; }; -- cgit v1.2.3