|
@@ -91,6 +91,7 @@ namespace IMGUI_STB_NAMESPACE
|
|
|
#pragma GCC diagnostic ignored "-Wcast-qual" // warning: cast from type 'const xxxx *' to type 'xxxx *' casts away qualifiers
|
|
|
#endif
|
|
|
|
|
|
+#ifndef STB_RECT_PACK_IMPLEMENTATION // in case the user already have an implementation in the _same_ compilation unit (e.g. unity builds)
|
|
|
#ifndef IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
|
|
#define STBRP_STATIC
|
|
|
#define STBRP_ASSERT(x) IM_ASSERT(x)
|
|
@@ -101,7 +102,9 @@ namespace IMGUI_STB_NAMESPACE
|
|
|
#else
|
|
|
#include "stb_rect_pack.h"
|
|
|
#endif
|
|
|
+#endif
|
|
|
|
|
|
+#ifndef STB_TRUETYPE_IMPLEMENTATION // in case the user already have an implementation in the _same_ compilation unit (e.g. unity builds)
|
|
|
#ifndef IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
|
|
#define STBTT_malloc(x,u) ((void)(u), ImGui::MemAlloc(x))
|
|
|
#define STBTT_free(x,u) ((void)(u), ImGui::MemFree(x))
|
|
@@ -116,6 +119,7 @@ namespace IMGUI_STB_NAMESPACE
|
|
|
#else
|
|
|
#include "stb_truetype.h"
|
|
|
#endif
|
|
|
+#endif
|
|
|
|
|
|
#ifdef __GNUC__
|
|
|
#pragma GCC diagnostic pop
|