summaryrefslogtreecommitdiff
path: root/src/KingSystem/Utils/Thread/TaskQueueBase.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2020-10-24 17:49:05 +0200
committerLéo Lam <leo@leolam.fr>2020-10-24 17:49:27 +0200
commit45b4c7e29fdeb50269ff5d3bd5bc28b5bb56d7d1 (patch)
tree74130fe755f782f03a0531ad1e4f7a1007c54c44 /src/KingSystem/Utils/Thread/TaskQueueBase.cpp
parent6cb668288f6786b864029ebf47cc5e4d010ae43e (diff)
ksys/util: Fix minor regalloc issue in TaskQueueBase
Diffstat (limited to 'src/KingSystem/Utils/Thread/TaskQueueBase.cpp')
-rw-r--r--src/KingSystem/Utils/Thread/TaskQueueBase.cpp4
1 files changed, 1 insertions, 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;