From 328695bd47551c3eb30b9504d79458a40ffe28b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Floru=C3=9F?= Date: Sat, 10 Dec 2022 17:01:15 +0100 Subject: [PATCH] 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 --- imgui_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_internal.h b/imgui_internal.h index bd27dab7..4dc34427 100644 --- a/imgui_internal.h +++ b/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