Skip to content

Commit

Permalink
Remove unneeded DEBUG conditionals. (#9849)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeach authored Jun 15, 2023
1 parent 6935af7 commit 6411b26
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions iocore/eventsystem/I_Action.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class Action
machine.
*/
int cancelled = false;
bool cancelled = false;

/**
Cancels the asynchronous operation represented by this action.
Expand All @@ -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
}

/**
Expand All @@ -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 *
Expand Down

0 comments on commit 6411b26

Please sign in to comment.