From 3e08caaf327dc41928ef04440e3027e2ddfcefb5 Mon Sep 17 00:00:00 2001 From: Robert Norton Date: Fri, 29 Apr 2022 11:33:14 +0100 Subject: [PATCH] Simplify asserts introduced in #512. (#513) These are functionally equivalent but have the form A -> B (i.e. !A || B in C++). --- src/snmalloc/mem/backend_wrappers.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/snmalloc/mem/backend_wrappers.h b/src/snmalloc/mem/backend_wrappers.h index a16b7e8..e26cc22 100644 --- a/src/snmalloc/mem/backend_wrappers.h +++ b/src/snmalloc/mem/backend_wrappers.h @@ -86,14 +86,12 @@ namespace snmalloc { static_assert( !detail::has_domesticate(0) || - (detail::has_domesticate(0) && - Backend::Options.HasDomesticate), + Backend::Options.HasDomesticate, "Back end provides domesticate function but opts out of using it "); static_assert( detail::has_domesticate(0) || - !(detail::has_domesticate(0) && - Backend::Options.HasDomesticate), + !Backend::Options.HasDomesticate, "Back end does not provide capptr_domesticate and requests its use"); if constexpr (Backend::Options.HasDomesticate) {