summaryrefslogtreecommitdiff
path: root/src/KingSystem
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-05-09 15:02:03 +0200
committerLéo Lam <leo@leolam.fr>2021-05-09 15:09:39 +0200
commit2fef4f821eea3080017ae5229eb50b8daf020c71 (patch)
tree8eca19c639c193aef9e8bd81ad4648b8bf359936 /src/KingSystem
parent52c4ba1fc02a44f3ba27617444a70c5bd564f47b (diff)
lib: Update sead
Diffstat (limited to 'src/KingSystem')
-rw-r--r--src/KingSystem/ActorSystem/actBaseProcJob.cpp4
-rw-r--r--src/KingSystem/Utils/Thread/TaskMgr.h4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/KingSystem/ActorSystem/actBaseProcJob.cpp b/src/KingSystem/ActorSystem/actBaseProcJob.cpp
index 1c64e5ee..71a969da 100644
--- a/src/KingSystem/ActorSystem/actBaseProcJob.cpp
+++ b/src/KingSystem/ActorSystem/actBaseProcJob.cpp
@@ -12,7 +12,7 @@ BaseProcJobLink::BaseProcJobLink(BaseProc* proc, u8 priority)
sead::TListNode<BaseProc*>* BaseProcJobList::front() const {
for (const auto& list : lists) {
- if (list.size() >= 1 && list.front())
+ if (list.front())
return list.front();
}
return nullptr;
@@ -23,7 +23,7 @@ sead::TListNode<BaseProc*>* BaseProcJobList::next(BaseProcJobLink* link) const {
return next;
for (int i = (link->getPriority2() >> 1) + 1; i < lists.size(); ++i) {
- if (lists[i].size() >= 1 && lists[i].front())
+ if (lists[i].front())
return lists[i].front();
}
diff --git a/src/KingSystem/Utils/Thread/TaskMgr.h b/src/KingSystem/Utils/Thread/TaskMgr.h
index a6cc2960..4c8fa131 100644
--- a/src/KingSystem/Utils/Thread/TaskMgr.h
+++ b/src/KingSystem/Utils/Thread/TaskMgr.h
@@ -50,9 +50,7 @@ public:
void initAndCheckType(s32 num_tasks, sead::Heap* heap) {
initImpl_<TaskType>(num_tasks, heap);
if (hasTasks()) {
- Task* task = nullptr;
- if (mFreeTaskLists[0].size() >= 1)
- task = mFreeTaskLists[0].front();
+ Task* task = mFreeTaskLists[0].front();
const bool is_derived_from_managed_task = sead::IsDerivedFrom<ManagedTask>(task);
SEAD_ASSERT(is_derived_from_managed_task);
}