mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Disable format checks when using stb_sprintf.h
STB sprintf allows extra formats like %b or %$d. If ImGui is configured to use STB sprintf, it generates warnings with GCC and clang when using such formats because it keeps applying default printf-style warnings. This commit disables printf-style warnings when using STB sprintf. Since the printf-style warnings are defined in imgui.h based on the compiler, IMGUI_USE_STB_SPRINTF can't just be defined in the cpp file anymore and it's been moved as a proper config in imconfig.h.
This commit is contained in:
@ -1354,7 +1354,6 @@ const char* ImStrSkipBlank(const char* str)
|
||||
// You may set IMGUI_USE_STB_SPRINTF to use our default wrapper, or set IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS
|
||||
// and setup the wrapper yourself. (FIXME-OPT: Some of our high-level operations such as ImGuiTextBuffer::appendfv() are
|
||||
// designed using two-passes worst case, which probably could be improved using the stbsp_vsprintfcb() function.)
|
||||
//#define IMGUI_USE_STB_SPRINTF
|
||||
#ifdef IMGUI_USE_STB_SPRINTF
|
||||
#define STB_SPRINTF_IMPLEMENTATION
|
||||
#include "stb_sprintf.h"
|
||||
|
Reference in New Issue
Block a user