From e980d6f67964f9333e0c611139f72bfc0fc34109 Mon Sep 17 00:00:00 2001 From: kinbei Date: Sun, 18 Jul 2021 23:06:08 +0800 Subject: [PATCH 1/2] export Rml::Assert in release mode. --- Include/RmlUi/Core/Debug.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Include/RmlUi/Core/Debug.h b/Include/RmlUi/Core/Debug.h index 354e33a5a..8f21aed56 100644 --- a/Include/RmlUi/Core/Debug.h +++ b/Include/RmlUi/Core/Debug.h @@ -54,12 +54,18 @@ // Define the LT_ASSERT and RMLUI_VERIFY macros. #if !defined RMLUI_DEBUG +namespace Rml { + +bool RMLUICORE_API Assert(const char* message, const char* file, int line); #define RMLUI_ASSERT(x) #define RMLUI_ASSERTMSG(x, m) #define RMLUI_ERROR #define RMLUI_ERRORMSG(m) #define RMLUI_VERIFY(x) x #define RMLUI_ASSERT_NONRECURSIVE + +} // namespace Rml + #else namespace Rml { From 02a5817458bcdd5a38e203d6a43c7e6a1bad7b57 Mon Sep 17 00:00:00 2001 From: Michael Ragazzon Date: Mon, 19 Jul 2021 15:03:23 +0200 Subject: [PATCH 2/2] Cleanup Debug.h --- Include/RmlUi/Core/Debug.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Include/RmlUi/Core/Debug.h b/Include/RmlUi/Core/Debug.h index 8f21aed56..38d9c8b84 100644 --- a/Include/RmlUi/Core/Debug.h +++ b/Include/RmlUi/Core/Debug.h @@ -51,12 +51,15 @@ #endif - -// Define the LT_ASSERT and RMLUI_VERIFY macros. -#if !defined RMLUI_DEBUG namespace Rml { bool RMLUICORE_API Assert(const char* message, const char* file, int line); + +} + +// Define the RmlUi assertion macros. +#if !defined RMLUI_DEBUG + #define RMLUI_ASSERT(x) #define RMLUI_ASSERTMSG(x, m) #define RMLUI_ERROR @@ -64,12 +67,8 @@ bool RMLUICORE_API Assert(const char* message, const char* file, int line); #define RMLUI_VERIFY(x) x #define RMLUI_ASSERT_NONRECURSIVE -} // namespace Rml - #else -namespace Rml { -bool RMLUICORE_API Assert(const char* message, const char* file, int line); #define RMLUI_ASSERT(x) \ if (!(x)) \ { \ @@ -113,8 +112,6 @@ struct RmlUiAssertNonrecursive { static bool rmlui_nonrecursive_entered = false; \ RmlUiAssertNonrecursive rmlui_nonrecursive(rmlui_nonrecursive_entered) -} // namespace Rml -#endif - +#endif // RMLUI_DEBUG -#endif +#endif // RMLUI_CORE_DEBUG_H