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:
Loïc Molinari
2019-12-29 15:39:49 +01:00
committed by omar
parent aa34681652
commit 6c00d1916e
4 changed files with 7 additions and 2 deletions

View File

@ -75,6 +75,8 @@ Other Changes:
we will rework the circle rendering functions to use textures and automatic segment count
selection, those new api can fill a gap. [@ShironekoBen]
- Misc: Added ImGuiMouseCursor_NotAllowed enum so it can be used by more shared widgets. [@rokups]
- Misc: Disable format checks when using stb_printf, to allow using extra formats.
Made IMGUI_USE_STB_SPRINTF a properly documented imconfig.h flag. (#2954) [@loicmolinari]
- Misc: Added misc/single_file/imgui_single_file.h, We use this to validate compiling all *.cpp
files in a same compilation unit. Actual users of that technique (also called "Unity builds")
can generally provide this themselves, so we don't really recommend you use this. [@rokups]