Skip to content

Commit 328695b

Browse files
Manuzorocornut
authored andcommitted
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
1 parent da83253 commit 328695b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imgui_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ namespace ImStb
205205
#ifndef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS
206206
#define IMGUI_DEBUG_PRINTF(_FMT,...) printf(_FMT, __VA_ARGS__)
207207
#else
208-
#define IMGUI_DEBUG_PRINTF(_FMT,...)
208+
#define IMGUI_DEBUG_PRINTF(_FMT,...) ((void)0)
209209
#endif
210210
#endif
211211

0 commit comments

Comments
 (0)