yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

kernel: Fix build with recent compiler flag changes

This slipped through the cracks due to another change being merged
before the compiler flag changes.
This commit is contained in:
Lioncash 2020-10-20 20:22:33 -04:00
parent 536c51912d
commit fdd9154069
1 changed files with 8 additions and 4 deletions

View File

@ -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 {