diff options
| author | Mai <mai.iam2048@gmail.com> | 2023-02-16 00:56:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-16 00:56:01 -0500 |
| commit | 19bf13d3bb2c02f00c1fb01da6f9c6e381a087e4 (patch) | |
| tree | 81b68746766d65f7c44133440399352b1c7a66ad /Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp | |
| parent | 089eab96d721dc65e60090f545d41dd6bd5925e9 (diff) | |
| parent | 74a14c7d1fdbf19ecd1fedb1fcc5f664b130c355 (diff) | |
Merge pull request #11572 from Pokechu22/uninitialized-variables-feb-2023
Fix uninitialized variable warnings (C26495)
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp index 12279b504b..4d3fa483e3 100644 --- a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp @@ -153,10 +153,10 @@ private: const std::string m_server_address; const u16 m_server_port; - s16 m_touch_x_min; - s16 m_touch_y_min; - s16 m_touch_x_max; - s16 m_touch_y_max; + s16 m_touch_x_min = 0; + s16 m_touch_y_min = 0; + s16 m_touch_x_max = 0; + s16 m_touch_y_max = 0; const u32 m_client_uid; }; @@ -192,7 +192,7 @@ struct Server std::string m_description; std::string m_address; - u16 m_port; + u16 m_port = 0; std::array<Proto::MessageType::PortInfo, Proto::PORT_COUNT> m_port_info{}; sf::UdpSocket m_socket; SteadyClock::time_point m_disconnect_time = SteadyClock::now(); @@ -213,9 +213,9 @@ private: void StartHotplugThread(); void StopHotplugThread(); - bool m_servers_enabled; + bool m_servers_enabled = false; std::vector<Server> m_servers; - u32 m_client_uid; + u32 m_client_uid = 0; SteadyClock::time_point m_next_listports_time; std::thread m_hotplug_thread; Common::Flag m_hotplug_thread_running; |
