Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export Rml::Assert in release mode. #209

Merged
merged 2 commits into from
Jul 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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