diff options
| author | 2020-10-20 20:22:33 -0400 | |
|---|---|---|
| committer | 2020-10-20 20:23:18 -0400 | |
| commit | fdd91540695594c4b015f234325a950a5e6566e9 (patch) | |
| tree | 2f265058286e832e322e89f87035d665675122e3 /src/core/hle/kernel/kernel.cpp | |
| parent | Merge pull request #4807 from ReinUsesLisp/glasm-robust-ssbo (diff) | |
| download | yuzu-fdd91540695594c4b015f234325a950a5e6566e9.tar.gz yuzu-fdd91540695594c4b015f234325a950a5e6566e9.tar.xz yuzu-fdd91540695594c4b015f234325a950a5e6566e9.zip | |
kernel: Fix build with recent compiler flag changes
This slipped through the cracks due to another change being merged
before the compiler flag changes.
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index ed30854ee..56e14da6b 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -194,7 +194,8 @@ struct KernelCore::Impl { | |||
| 194 | if (!is_multicore) { | 194 | if (!is_multicore) { |
| 195 | single_core_thread_id = this_id; | 195 | single_core_thread_id = this_id; |
| 196 | } | 196 | } |
| 197 | const auto end = register_host_thread_keys.begin() + num_host_threads; | 197 | const auto end = |
| 198 | register_host_thread_keys.begin() + static_cast<ptrdiff_t>(num_host_threads); | ||
| 198 | const auto it = std::find(register_host_thread_keys.begin(), end, this_id); | 199 | const auto it = std::find(register_host_thread_keys.begin(), end, this_id); |
| 199 | ASSERT(core_id < Core::Hardware::NUM_CPU_CORES); | 200 | ASSERT(core_id < Core::Hardware::NUM_CPU_CORES); |
| 200 | ASSERT(it == end); | 201 | ASSERT(it == end); |
| @@ -205,7 +206,8 @@ struct KernelCore::Impl { | |||
| 205 | 206 | ||
| 206 | void RegisterHostThread() { | 207 | void RegisterHostThread() { |
| 207 | const std::thread::id this_id = std::this_thread::get_id(); | 208 | const std::thread::id this_id = std::this_thread::get_id(); |
| 208 | const auto end = register_host_thread_keys.begin() + num_host_threads; | 209 | const auto end = |
| 210 | register_host_thread_keys.begin() + static_cast<ptrdiff_t>(num_host_threads); | ||
| 209 | const auto it = std::find(register_host_thread_keys.begin(), end, this_id); | 211 | const auto it = std::find(register_host_thread_keys.begin(), end, this_id); |
| 210 | if (it == end) { | 212 | if (it == end) { |
| 211 | InsertHostThread(registered_thread_ids++); | 213 | InsertHostThread(registered_thread_ids++); |
| @@ -224,12 +226,14 @@ struct KernelCore::Impl { | |||
| 224 | if (!is_multicore && single_core_thread_id == this_id) { | 226 | if (!is_multicore && single_core_thread_id == this_id) { |
| 225 | return static_cast<u32>(system.GetCpuManager().CurrentCore()); | 227 | return static_cast<u32>(system.GetCpuManager().CurrentCore()); |
| 226 | } | 228 | } |
| 227 | const auto end = register_host_thread_keys.begin() + num_host_threads; | 229 | const auto end = |
| 230 | register_host_thread_keys.begin() + static_cast<ptrdiff_t>(num_host_threads); | ||
| 228 | const auto it = std::find(register_host_thread_keys.begin(), end, this_id); | 231 | const auto it = std::find(register_host_thread_keys.begin(), end, this_id); |
| 229 | if (it == end) { | 232 | if (it == end) { |
| 230 | return Core::INVALID_HOST_THREAD_ID; | 233 | return Core::INVALID_HOST_THREAD_ID; |
| 231 | } | 234 | } |
| 232 | return register_host_thread_values[std::distance(register_host_thread_keys.begin(), it)]; | 235 | return register_host_thread_values[static_cast<size_t>( |
| 236 | std::distance(register_host_thread_keys.begin(), it))]; | ||
| 233 | } | 237 | } |
| 234 | 238 | ||
| 235 | Core::EmuThreadHandle GetCurrentEmuThreadID() const { | 239 | Core::EmuThreadHandle GetCurrentEmuThreadID() const { |