summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-10-21 02:22:33 +0200
committerLioncash <mathew1800@gmail.com>2020-10-21 02:23:18 +0200
commitfdd91540695594c4b015f234325a950a5e6566e9 (patch)
tree2f265058286e832e322e89f87035d665675122e3 /src/core/hle/kernel
parentMerge pull request #4807 from ReinUsesLisp/glasm-robust-ssbo (diff)
downloadyuzu-fdd91540695594c4b015f234325a950a5e6566e9.tar
yuzu-fdd91540695594c4b015f234325a950a5e6566e9.tar.gz
yuzu-fdd91540695594c4b015f234325a950a5e6566e9.tar.bz2
yuzu-fdd91540695594c4b015f234325a950a5e6566e9.tar.lz
yuzu-fdd91540695594c4b015f234325a950a5e6566e9.tar.xz
yuzu-fdd91540695594c4b015f234325a950a5e6566e9.tar.zst
yuzu-fdd91540695594c4b015f234325a950a5e6566e9.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/kernel.cpp12
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 {
if (!is_multicore) {
single_core_thread_id = this_id;
}
- const auto end = register_host_thread_keys.begin() + num_host_threads;
+ const auto end =
+ register_host_thread_keys.begin() + static_cast<ptrdiff_t>(num_host_threads);
const auto it = std::find(register_host_thread_keys.begin(), end, this_id);
ASSERT(core_id < Core::Hardware::NUM_CPU_CORES);
ASSERT(it == end);
@@ -205,7 +206,8 @@ struct KernelCore::Impl {
void RegisterHostThread() {
const std::thread::id this_id = std::this_thread::get_id();
- const auto end = register_host_thread_keys.begin() + num_host_threads;
+ const auto end =
+ register_host_thread_keys.begin() + static_cast<ptrdiff_t>(num_host_threads);
const auto it = std::find(register_host_thread_keys.begin(), end, this_id);
if (it == end) {
InsertHostThread(registered_thread_ids++);
@@ -224,12 +226,14 @@ struct KernelCore::Impl {
if (!is_multicore && single_core_thread_id == this_id) {
return static_cast<u32>(system.GetCpuManager().CurrentCore());
}
- const auto end = register_host_thread_keys.begin() + num_host_threads;
+ const auto end =
+ register_host_thread_keys.begin() + static_cast<ptrdiff_t>(num_host_threads);
const auto it = std::find(register_host_thread_keys.begin(), end, this_id);
if (it == end) {
return Core::INVALID_HOST_THREAD_ID;
}
- return register_host_thread_values[std::distance(register_host_thread_keys.begin(), it)];
+ return register_host_thread_values[static_cast<size_t>(
+ std::distance(register_host_thread_keys.begin(), it))];
}
Core::EmuThreadHandle GetCurrentEmuThreadID() const {