From 08b9f8dea820aa79eda4557799273a18508dbe90 Mon Sep 17 00:00:00 2001 From: James Peach Date: Thu, 15 Jun 2023 15:39:21 +1000 Subject: [PATCH] Remove unneeded DEBUG conditionals. ink_assert is already compiled out in non-debug builds, so we don't need to protect assertions with "#if DEBUG". Since we are touching this file, make the type of "cancelled" bool, since it is already treated as if it was. Signed-off-by: James Peach --- iocore/eventsystem/I_Action.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/iocore/eventsystem/I_Action.h b/iocore/eventsystem/I_Action.h index 643f9a017f6..de193ae19b5 100644 --- a/iocore/eventsystem/I_Action.h +++ b/iocore/eventsystem/I_Action.h @@ -123,7 +123,7 @@ class Action machine. */ - int cancelled = false; + bool cancelled = false; /** Cancels the asynchronous operation represented by this action. @@ -141,14 +141,8 @@ class Action cancel(Continuation *c = nullptr) { ink_assert(!c || c == continuation); -#ifdef DEBUG ink_assert(!cancelled); cancelled = true; -#else - if (!cancelled) { - cancelled = true; - } -#endif } /** @@ -166,14 +160,8 @@ class Action cancel_action(Continuation *c = nullptr) { ink_assert(!c || c == continuation); -#ifdef DEBUG ink_assert(!cancelled); cancelled = true; -#else - if (!cancelled) { - cancelled = true; - } -#endif } Continuation *