From c7f50957db9b52b8b9b1c88cf9c12fa23b23f1bd Mon Sep 17 00:00:00 2001 From: _Redstone_c_ Date: Fri, 20 Jan 2023 23:22:19 +0800 Subject: [PATCH] perf(miscellaneous): optimize check_no_entry() and unimplemented() --- .../Source/Public/Miscellaneous/AssertionMacros.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Redcraft.Utility/Source/Public/Miscellaneous/AssertionMacros.h b/Redcraft.Utility/Source/Public/Miscellaneous/AssertionMacros.h index ffc4432..348ab9d 100644 --- a/Redcraft.Utility/Source/Public/Miscellaneous/AssertionMacros.h +++ b/Redcraft.Utility/Source/Public/Miscellaneous/AssertionMacros.h @@ -1,6 +1,7 @@ #pragma once #include "CoreTypes.h" +#include "Miscellaneous/ProgramSupport.h" #include "Miscellaneous/PreprocessorHelpers.h" #ifdef NDEBUG @@ -67,12 +68,12 @@ NAMESPACE_PRIVATE_END # define check(InExpr) # define checkf(InExpr, InFormat, ...) -# define check_no_entry() +# define check_no_entry() { Unreachable(); } # define check_no_reentry() # define check_no_recursion() # define verify(InExpr) { if(InExpr) { } } # define verifyf(InExpr, InFormat, ...) { if(InExpr) { } } -# define unimplemented() +# define unimplemented() { Unreachable(); } #endif