Skip to content

Commit

Permalink
Provide a non-empty definition for IMGUI_DEBUG_PRINTF when disabled. (#…
Browse files Browse the repository at this point in the history
…5978)

Fixes MSVC warning C4390 when /W3 is specified. Reworked from original PR: (void)0 provides better codegen by do-while.
Similar to #5901
  • Loading branch information
Manuzor authored and ocornut committed Jan 2, 2023
1 parent da83253 commit 328695b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ namespace ImStb
#ifndef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS
#define IMGUI_DEBUG_PRINTF(_FMT,...) printf(_FMT, __VA_ARGS__)
#else
#define IMGUI_DEBUG_PRINTF(_FMT,...)
#define IMGUI_DEBUG_PRINTF(_FMT,...) ((void)0)
#endif
#endif

Expand Down

0 comments on commit 328695b

Please sign in to comment.