mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 00:59:44 +00:00
Core: Make use of C++17 deduction guides with locks
C++17 allows omitting the mutex type, which makes for both less reading and more flexibility (e.g. The mutex type can change and all occurrences don't need to be updated).
This commit is contained in:
parent
41316daf91
commit
a8b0661fb0
23 changed files with 98 additions and 98 deletions
|
@ -169,7 +169,7 @@ std::string GetInputDisplay()
|
|||
|
||||
std::string input_display;
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_input_display_lock);
|
||||
std::lock_guard guard(s_input_display_lock);
|
||||
for (int i = 0; i < 8; ++i)
|
||||
{
|
||||
if ((s_controllers & (1 << i)) != 0)
|
||||
|
@ -634,7 +634,7 @@ static void SetInputDisplayString(ControllerState padState, int controllerID)
|
|||
display_str += " DISCONNECTED";
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> guard(s_input_display_lock);
|
||||
std::lock_guard guard(s_input_display_lock);
|
||||
s_InputDisplay[controllerID] = std::move(display_str);
|
||||
}
|
||||
|
||||
|
@ -765,7 +765,7 @@ static void SetWiiInputDisplayString(int remoteID, const DataReportBuilder& rpt,
|
|||
display_str += Analog2DToString(right_stick.x, right_stick.y, " R-ANA", 31);
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> guard(s_input_display_lock);
|
||||
std::lock_guard guard(s_input_display_lock);
|
||||
s_InputDisplay[controllerID] = std::move(display_str);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue