diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-11-22 16:20:48 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-11-22 17:06:10 -0500 |
| commit | db9e59276556d1797d4a9b939434e4dbd8f86e40 (patch) | |
| tree | f7ca4cfd25ec31e3f7b4c0747fb348dd64ba53a5 /Source/Core/InputCommon/ControllerInterface | |
| parent | 278d03f737fe3bf1e4ca2b9b1ea33bbd7e94aa8f (diff) | |
InputCommon/DualShockUDPClient: Use deduction guides for lock_guard
With C++17, we can use template deduction guides provided by the
standard library. This allows the omission of the mutex type itself.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp index 6183b69049..6595a0193b 100644 --- a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp @@ -200,7 +200,7 @@ static void HotplugThreadFunc() { const bool port_changed = !IsSameController(*port_info, s_port_info[port_info->pad_id]); { - std::lock_guard<std::mutex> lock(s_port_info_mutex); + std::lock_guard lock{s_port_info_mutex}; s_port_info[port_info->pad_id] = *port_info; } if (port_changed) @@ -283,7 +283,7 @@ void PopulateDevices() g_controller_interface.RemoveDevice( [](const auto* dev) { return dev->GetSource() == "DSUClient"; }); - std::lock_guard<std::mutex> lock(s_port_info_mutex); + std::lock_guard lock{s_port_info_mutex}; for (size_t port_index = 0; port_index < s_port_info.size(); port_index++) { const Proto::MessageType::PortInfo& port_info = s_port_info[port_index]; |
