Skip to content
Snippets Groups Projects
Commit fdd91540 authored by Lioncash's avatar Lioncash
Browse files

kernel: Fix build with recent compiler flag changes

This slipped through the cracks due to another change being merged
before the compiler flag changes.
parent 536c5191
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment