diff options
| author | AlexApps99 <alex.apps99@gmail.com> | 2021-07-26 21:58:51 +1200 |
|---|---|---|
| committer | AlexApps99 <alex.apps99@gmail.com> | 2021-07-26 23:05:19 +1200 |
| commit | 42807160cfb33af9f3cf2fa6b0ba98f232208cdb (patch) | |
| tree | 95b1b16a3f4cf7d0ab51e90b3d73e53f74ba7f2b /src/KingSystem/Utils/Thread/TaskThread.cpp | |
| parent | 88bcc9eec1481b47361dc717c83e4953e8929a2b (diff) | |
Add #ifdef declarations for NON_MATCHING code
Diffstat (limited to 'src/KingSystem/Utils/Thread/TaskThread.cpp')
| -rw-r--r-- | src/KingSystem/Utils/Thread/TaskThread.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/KingSystem/Utils/Thread/TaskThread.cpp b/src/KingSystem/Utils/Thread/TaskThread.cpp index 27dcd4e9..be24952b 100644 --- a/src/KingSystem/Utils/Thread/TaskThread.cpp +++ b/src/KingSystem/Utils/Thread/TaskThread.cpp @@ -136,8 +136,9 @@ bool TaskThread::isLookingForTask() const { return mFlags.isOn(Flag::IsLookingForTask); } -// NON_MATCHING: branching for `if (mTaskQueue->getNumActiveTasks() == 0)`: +// branching for `if (mTaskQueue->getNumActiveTasks() == 0)`: // Clang got rid of the branch and merged the two mFlags writes +#ifdef NON_MATCHING void TaskThread::calc_(sead::MessageQueue::Element msg) { if (mFlags.isOn(Flag::Paused)) { if (msg != cMessage_Resume) @@ -239,6 +240,7 @@ void TaskThread::calc_(sead::MessageQueue::Element msg) { mFlags.reset(Flag::IsActive); mFlags.reset(Flag::IsLookingForTask); } +#endif bool TaskThread::receivedPauseMsg() const { return mMessageQueue.peek(sead::MessageQueue::BlockType::NonBlocking) == cMessage_Pause; |
