diff options
| author | 2019-05-14 08:18:44 -0400 | |
|---|---|---|
| committer | 2019-05-14 08:18:48 -0400 | |
| commit | d6d809db87750a1e47d7a2a2d3f5e2d59d94f146 (patch) | |
| tree | 1bd68b545096dd9c07d03e619343d5d23ec3a8fe | |
| parent | Merge pull request #2462 from lioncash/video-mm (diff) | |
| download | yuzu-d6d809db87750a1e47d7a2a2d3f5e2d59d94f146.tar.gz yuzu-d6d809db87750a1e47d7a2a2d3f5e2d59d94f146.tar.xz yuzu-d6d809db87750a1e47d7a2a2d3f5e2d59d94f146.zip | |
yuzu: Remove explicit types from locks where applicable
With C++17's deduction guides, the type doesn't need to be explicitly
specified within locking primitives anymore.
| -rw-r--r-- | src/video_core/gpu_thread.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/gpu_thread.h | 2 | ||||
| -rw-r--r-- | src/yuzu/applets/error.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index 03856013f..1e2ff46b0 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp | |||
| @@ -118,7 +118,7 @@ void SynchState::WaitForSynchronization(u64 fence) { | |||
| 118 | // Wait for the GPU to be idle (all commands to be executed) | 118 | // Wait for the GPU to be idle (all commands to be executed) |
| 119 | { | 119 | { |
| 120 | MICROPROFILE_SCOPE(GPU_wait); | 120 | MICROPROFILE_SCOPE(GPU_wait); |
| 121 | std::unique_lock<std::mutex> lock{synchronization_mutex}; | 121 | std::unique_lock lock{synchronization_mutex}; |
| 122 | synchronization_condition.wait(lock, [this, fence] { return signaled_fence >= fence; }); | 122 | synchronization_condition.wait(lock, [this, fence] { return signaled_fence >= fence; }); |
| 123 | } | 123 | } |
| 124 | } | 124 | } |
diff --git a/src/video_core/gpu_thread.h b/src/video_core/gpu_thread.h index cc14527c7..cdf86f562 100644 --- a/src/video_core/gpu_thread.h +++ b/src/video_core/gpu_thread.h | |||
| @@ -109,7 +109,7 @@ struct SynchState final { | |||
| 109 | 109 | ||
| 110 | void TrySynchronize() { | 110 | void TrySynchronize() { |
| 111 | if (IsSynchronized()) { | 111 | if (IsSynchronized()) { |
| 112 | std::lock_guard<std::mutex> lock{synchronization_mutex}; | 112 | std::lock_guard lock{synchronization_mutex}; |
| 113 | synchronization_condition.notify_one(); | 113 | synchronization_condition.notify_one(); |
| 114 | } | 114 | } |
| 115 | } | 115 | } |
diff --git a/src/yuzu/applets/error.cpp b/src/yuzu/applets/error.cpp index 1fb2fe277..106dde9e2 100644 --- a/src/yuzu/applets/error.cpp +++ b/src/yuzu/applets/error.cpp | |||
| @@ -54,6 +54,6 @@ void QtErrorDisplay::ShowCustomErrorText(ResultCode error, std::string dialog_te | |||
| 54 | 54 | ||
| 55 | void QtErrorDisplay::MainWindowFinishedError() { | 55 | void QtErrorDisplay::MainWindowFinishedError() { |
| 56 | // Acquire the HLE mutex | 56 | // Acquire the HLE mutex |
| 57 | std::lock_guard<std::recursive_mutex> lock(HLE::g_hle_lock); | 57 | std::lock_guard lock{HLE::g_hle_lock}; |
| 58 | callback(); | 58 | callback(); |
| 59 | } | 59 | } |