mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Internals: Routing recoverable user errors via IMGUI_USER_ERROR() macro. (#1651)
This commit is contained in:
@ -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__)
|
||||
|
Reference in New Issue
Block a user