From df36d656650198b3cbf140e2982752a95b3f2c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 27 Feb 2022 12:48:28 +0100 Subject: Revert "Add #ifdef declarations for NON_MATCHING code" This reverts commit 42807160cfb33af9f3cf2fa6b0ba98f232208cdb. It makes searching for NON_MATCHING comment descriptions much less convenient in most text editors or IDEs, and we want the function CSV to be the single source of truth for function statuses. Having a function marked as matching but not built because of a stray #ifdef would be bad. --- src/KingSystem/Utils/Thread/Task.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/KingSystem/Utils/Thread/Task.cpp') diff --git a/src/KingSystem/Utils/Thread/Task.cpp b/src/KingSystem/Utils/Thread/Task.cpp index 71cf18f5..e2ba464f 100644 --- a/src/KingSystem/Utils/Thread/Task.cpp +++ b/src/KingSystem/Utils/Thread/Task.cpp @@ -34,8 +34,7 @@ void Task::deleteDelegate_() { } } -// mDelegate2 = nullptr store -#ifdef NON_MATCHING +// NON_MATCHING: mDelegate2 = nullptr store void Task::finalize_() { if (mStatus == Status::Finalized) return; @@ -48,7 +47,6 @@ void Task::finalize_() { mRemoveCallback = nullptr; mStatus = Status::Finalized; } -#endif bool Task::setDelegate(const TaskDelegateSetter& setter) { mDelegate = setter.getDelegate(); @@ -58,8 +56,7 @@ bool Task::setDelegate(const TaskDelegateSetter& setter) { return onSetDelegate_(setter); } -// branching -#ifdef NON_MATCHING +// NON_MATCHING: branching bool Task::submitRequest(TaskRequest& request) { // Processing this request is impossible if there is no thread *and* no queue! if (request.mThread == nullptr && request.mQueue == nullptr) @@ -117,7 +114,6 @@ bool Task::submitRequest(TaskRequest& request) { } return push_ok || b; } -#endif bool Task::canSubmitRequest() const { const bool run_finished_on_current_thread = -- cgit v1.2.3