From 45b4c7e29fdeb50269ff5d3bd5bc28b5bb56d7d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 24 Oct 2020 17:49:05 +0200 Subject: [PATCH] ksys/util: Fix minor regalloc issue in TaskQueueBase --- src/KingSystem/Utils/Thread/TaskQueueBase.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/KingSystem/Utils/Thread/TaskQueueBase.cpp b/src/KingSystem/Utils/Thread/TaskQueueBase.cpp index b6303ccb..49e91f24 100644 --- a/src/KingSystem/Utils/Thread/TaskQueueBase.cpp +++ b/src/KingSystem/Utils/Thread/TaskQueueBase.cpp @@ -336,7 +336,6 @@ void TaskQueueBase::notifyThreadsForNewTasks() { PrintDebug(sead::FormatFixedSafeString<128>("↓↓↓\nリトライ回数 %d 回\n↑↑↑\n", retry_count)); } -// NON_MATCHING: regalloc for max_idx bool TaskQueueBase::push(const PushArg& arg) { lock(); @@ -346,8 +345,7 @@ bool TaskQueueBase::push(const PushArg& arg) { } const auto num_tasks = mActiveTasks.size(); - const u8 max_idx = mLanes.size() - 1; - const u8 id = arg.lane_id <= max_idx ? arg.lane_id : max_idx; + const u8 id = arg.lane_id <= u8(mLanes.size() - 1) ? arg.lane_id : u8(mLanes.size() - 1); arg.task->setLaneId(id); bool added = false;