summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-11-22 15:51:25 -0500
committerLioncash <mathew1800@gmail.com>2019-11-22 15:56:29 -0500
commit4488719a761243bf6de95b6608d6ef6a780b7bd0 (patch)
tree1be27fab0776333dd93f55c79b91808bbb6bb796 /Source/Core/InputCommon/ControllerInterface
parent544d6cbe52015a73f036bc2f40789dfaf3ab137e (diff)
InputCommon/DualShockUDPClient: In-class initialize members where applicable
Deduplicates members within the constructor's initializer list.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp
index 9ed62e5285..b98e9d42bd 100644
--- a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp
@@ -96,16 +96,17 @@ public:
private:
const Proto::DsModel m_model;
const int m_index;
- u32 m_client_uid;
+ u32 m_client_uid = Common::Random::GenerateValue<u32>();
sf::UdpSocket m_socket;
- Common::DVec3 m_accel;
- Common::DVec3 m_gyro;
- std::chrono::steady_clock::time_point m_next_reregister;
- Proto::MessageType::PadDataResponse m_pad_data;
- Proto::Touch m_prev_touch;
- bool m_prev_touch_valid;
- int m_touch_x;
- int m_touch_y;
+ Common::DVec3 m_accel{};
+ Common::DVec3 m_gyro{};
+ std::chrono::steady_clock::time_point m_next_reregister =
+ std::chrono::steady_clock::time_point::min();
+ Proto::MessageType::PadDataResponse m_pad_data{};
+ Proto::Touch m_prev_touch{};
+ bool m_prev_touch_valid = false;
+ int m_touch_x = 0;
+ int m_touch_y = 0;
};
using MathUtil::GRAVITY_ACCELERATION;
@@ -297,11 +298,7 @@ void DeInit()
StopHotplugThread();
}
-Device::Device(Proto::DsModel model, int index)
- : m_model(model), m_index(index),
- m_client_uid(Common::Random::GenerateValue<u32>()), m_accel{}, m_gyro{},
- m_next_reregister(std::chrono::steady_clock::time_point::min()), m_pad_data{}, m_prev_touch{},
- m_prev_touch_valid(false), m_touch_x(0), m_touch_y(0)
+Device::Device(Proto::DsModel model, int index) : m_model{model}, m_index{index}
{
m_socket.setBlocking(false);