Skip to content

Commit

Permalink
Merge pull request #1927 from DARMA-tasking/1912-dont-error-check-ref…
Browse files Browse the repository at this point in the history
…erence-count-deref-on-envelope-in-production

1912 Use assert to optimize production path check
  • Loading branch information
PhilMiller authored Aug 31, 2022
2 parents ae0086d + f47c15a commit 7c0a83c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/vt/messaging/envelope/envelope_ref.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ template <typename Env>
inline RefType envelopeDeref(Env& env) {
Envelope* envp = reinterpret_cast<Envelope*>(&env);

if(not (envp->ref >= 1)){
vtAbort("Bad ref-count on message ref-decrement.");
}
vtAssert(envp->ref >= 1, "Bad ref-count on message ref-decrement.");

return --(envp->ref);
}
Expand Down

0 comments on commit 7c0a83c

Please sign in to comment.