general: Use deducation guides for std::lock_guard and std::unique_lock
Since C++17, the introduction of deduction guides for locking facilities means that we no longer need to hardcode the mutex type into the locks themselves, making it easier to switch mutex types, should it ever be necessary in the future.
This commit is contained in:
parent
d5bcb45b2a
commit
21c71d21ae
21 changed files with 124 additions and 122 deletions
|
@ -165,7 +165,7 @@ void Client::OnPadData(Response::PadData data) {
|
|||
Common::Vec3f accel = Common::MakeVec<float>(-data.accel.x, data.accel.y, -data.accel.z);
|
||||
Common::Vec3f gyro = Common::MakeVec<float>(-data.gyro.pitch, -data.gyro.yaw, data.gyro.roll);
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(status->update_mutex);
|
||||
std::lock_guard guard(status->update_mutex);
|
||||
|
||||
status->motion_status = {accel, gyro};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue