Skip to content

Commit

Permalink
export Rml::Assert in release mode. (#209)
Browse files Browse the repository at this point in the history
* export Rml::Assert in release mode.

* Cleanup Debug.h

Co-authored-by: Michael Ragazzon <michael.ragazzon@gmail.com>
  • Loading branch information
kinbei and mikke89 authored Jul 19, 2021
1 parent 34c4ea4 commit 3bc309e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Include/RmlUi/Core/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,24 @@
#endif


namespace Rml {

bool RMLUICORE_API Assert(const char* message, const char* file, int line);

// Define the LT_ASSERT and RMLUI_VERIFY macros.
}

// Define the RmlUi assertion macros.
#if !defined RMLUI_DEBUG

#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

#else
namespace Rml {

bool RMLUICORE_API Assert(const char* message, const char* file, int line);
#define RMLUI_ASSERT(x) \
if (!(x)) \
{ \
Expand Down Expand Up @@ -107,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

0 comments on commit 3bc309e

Please sign in to comment.