diff --git a/Source/Core/Core/NetPlayServer.cpp b/Source/Core/Core/NetPlayServer.cpp index 692beb20f1..a77ba7e489 100644 --- a/Source/Core/Core/NetPlayServer.cpp +++ b/Source/Core/Core/NetPlayServer.cpp @@ -58,17 +58,6 @@ NetPlayServer::~NetPlayServer() // called from ---GUI--- thread NetPlayServer::NetPlayServer(const u16 port, bool traversal, const std::string& centralServer, u16 centralPort) - : is_connected(false) - , m_is_running(false) - , m_do_loop(false) - , m_ping_key(0) - , m_update_pings(false) - , m_current_game(0) - , m_target_buffer_size(0) - , m_selected_game("") - , m_server(nullptr) - , m_traversal_client(nullptr) - , m_dialog(nullptr) { //--use server time if (enet_initialize() != 0) diff --git a/Source/Core/Core/NetPlayServer.h b/Source/Core/Core/NetPlayServer.h index cc6cb62820..05a5984f2a 100644 --- a/Source/Core/Core/NetPlayServer.h +++ b/Source/Core/Core/NetPlayServer.h @@ -50,7 +50,7 @@ public: std::unordered_set GetInterfaceSet(); std::string GetInterfaceHost(const std::string& inter); - bool is_connected; + bool is_connected = false; #ifdef USE_UPNP void TryPortmapping(u16 port); @@ -90,13 +90,13 @@ private: NetSettings m_settings; - bool m_is_running; - bool m_do_loop; + bool m_is_running = false; + bool m_do_loop = false; Common::Timer m_ping_timer; - u32 m_ping_key; - bool m_update_pings; - u32 m_current_game; - unsigned int m_target_buffer_size; + u32 m_ping_key = 0; + bool m_update_pings = false; + u32 m_current_game = 0; + unsigned int m_target_buffer_size = 0; PadMappingArray m_pad_map; PadMappingArray m_wiimote_map; @@ -117,9 +117,9 @@ private: std::thread m_thread; Common::FifoQueue, false> m_async_queue; - ENetHost* m_server; - TraversalClient* m_traversal_client; - NetPlayUI* m_dialog; + ENetHost* m_server = nullptr; + TraversalClient* m_traversal_client = nullptr; + NetPlayUI* m_dialog = nullptr; #ifdef USE_UPNP static void mapPortThread(const u16 port);