From 4959b757218d0cf5e00ef18f6f4bb415becbd95c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 Sep 2023 17:22:12 +0200 Subject: [PATCH] singles: use a whitelist for assertion macros like in Corrade. --- src/singles/MagnumMath.hpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/singles/MagnumMath.hpp b/src/singles/MagnumMath.hpp index 8cd6b478e..cd680637a 100644 --- a/src/singles/MagnumMath.hpp +++ b/src/singles/MagnumMath.hpp @@ -117,22 +117,21 @@ #pragma ACME path ../../../magnum-integration/src #pragma ACME revision magnum-integration/src echo "$(git describe --long --match 'v*') ($(date -d @$(git log -1 --format=%at) +%Y-%m-%d))" -/* Disable asserts that are not used. CORRADE_DEBUG_ASSERT, - CORRADE_CONSTEXPR_DEBUG_ASSERT, CORRADE_INTERNAL_DEBUG_ASSERT_OUTPUT and +/* CORRADE_DEBUG_ASSERT, CORRADE_CONSTEXPR_DEBUG_ASSERT, + CORRADE_INTERNAL_DEBUG_ASSERT_OUTPUT and CORRADE_INTERNAL_DEBUG_ASSERT_UNREACHABLE are used, wrapping the #include above. When enabling additional asserts, be sure to update them above as well-- without the _DEBUG variants, as they just delegate to the non-debug version of the macro. */ -#pragma ACME enable CORRADE_ASSERT_OUTPUT -#pragma ACME enable CORRADE_DEBUG_ASSERT_OUTPUT -#pragma ACME enable CORRADE_INTERNAL_ASSERT_EXPRESSION -#pragma ACME enable CORRADE_INTERNAL_DEBUG_ASSERT_EXPRESSION -#pragma ACME enable CORRADE_ASSERT_UNREACHABLE -#pragma ACME enable CORRADE_DEBUG_ASSERT_UNREACHABLE -#pragma ACME enable CORRADE_INTERNAL_ASSERT -#pragma ACME enable CORRADE_INTERNAL_DEBUG_ASSERT -#pragma ACME enable CORRADE_INTERNAL_CONSTEXPR_ASSERT -#pragma ACME enable CORRADE_INTERNAL_CONSTEXPR_DEBUG_ASSERT +#include "singles/assert.h" +#pragma ACME forget CORRADE_ASSERT +#pragma ACME forget CORRADE_DEBUG_ASSERT +#pragma ACME forget CORRADE_CONSTEXPR_ASSERT +#pragma ACME forget CORRADE_CONSTEXPR_DEBUG_ASSERT +#pragma ACME forget CORRADE_INTERNAL_ASSERT_OUTPUT +#pragma ACME forget CORRADE_INTERNAL_DEBUG_ASSERT_OUTPUT +#pragma ACME forget CORRADE_INTERNAL_ASSERT_UNREACHABLE +#pragma ACME forget CORRADE_INTERNAL_DEBUG_ASSERT_UNREACHABLE /* Disable strict weak ordering helpers as they're non-essential. The StrictWeakOrdering.h header isn't included either. */