Internals: Routing recoverable user errors via IMGUI_USER_ERROR() macro. (#1651)

This commit is contained in:
omar
2019-11-13 21:58:18 +01:00
parent 25eee91542
commit 03852470de
3 changed files with 14 additions and 10 deletions

View File

@ -161,6 +161,11 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit context pointer
#define IM_FLOOR(_VAL) ((float)(int)(_VAL)) // ImFloor() is not inlined in MSVC debug builds
#define IM_ROUND(_VAL) ((float)(int)((_VAL) + 0.5f)) //
// Error handling
#ifndef IMGUI_USER_ERROR
#define IMGUI_USER_ERROR(_EXPR, _MSG) IM_ASSERT((_EXPR) && (_MSG)) // Recoverable User Error
#endif
// Debug Logging
#ifndef IMGUI_DEBUG_LOG
#define IMGUI_DEBUG_LOG(_FMT,...) printf("[%05d] " _FMT, GImGui->FrameCount, __VA_ARGS__)