Added IMGUI_DISABLE_STB_SPRINTF_IMPLEMENTATION config macro to disable stb_sprintf implementation (#6626)

This commit is contained in:
septag
2023-07-21 11:38:54 +02:00
committed by ocornut
parent 1109de3827
commit f1781c20a3
3 changed files with 7 additions and 2 deletions

View File

@ -1858,13 +1858,15 @@ const char* ImStrSkipBlank(const char* str)
// 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.)
#ifdef IMGUI_USE_STB_SPRINTF
#ifndef IMGUI_DISABLE_STB_SPRINTF_IMPLEMENTATION
#define STB_SPRINTF_IMPLEMENTATION
#endif
#ifdef IMGUI_STB_SPRINTF_FILENAME
#include IMGUI_STB_SPRINTF_FILENAME
#else
#include "stb_sprintf.h"
#endif
#endif
#endif // #ifdef IMGUI_USE_STB_SPRINTF
#if defined(_MSC_VER) && !defined(vsnprintf)
#define vsnprintf _vsnprintf