Browse Source

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
Manuel Floruß 2 years ago
parent
commit
328695bd47
1 changed files with 1 additions and 1 deletions
  1. 1 1
      imgui_internal.h

+ 1 - 1
imgui_internal.h

@@ -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