Provide a non-empty definition for IMGUI_DEBUG_PRINTF when disabled. (#5978)

Fixes MSVC warning C4390 when /W3 is specified. Reworked from original PR: (void)0 provides better codegen by do-while.
Similar to #5901
This commit is contained in:
Manuel Floruß 2022-12-10 17:01:15 +01:00 committed by ocornut
parent da832532c0
commit 328695bd47

View File

@ -205,7 +205,7 @@ namespace ImStb
#ifndef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS #ifndef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS
#define IMGUI_DEBUG_PRINTF(_FMT,...) printf(_FMT, __VA_ARGS__) #define IMGUI_DEBUG_PRINTF(_FMT,...) printf(_FMT, __VA_ARGS__)
#else #else
#define IMGUI_DEBUG_PRINTF(_FMT,...) #define IMGUI_DEBUG_PRINTF(_FMT,...) ((void)0)
#endif #endif
#endif #endif