From 79d6f4e211f245de24ab7c3a58f33261bd7931bf Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 27 Jul 2023 19:45:28 +0200 Subject: [PATCH] Misc: Avoid stb_textedit.h reincluding string.h while in a namespace. (#6653, #4791) --- docs/CHANGELOG.txt | 2 ++ imgui_widgets.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 5030615d2157..4bef3a931d92 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -85,6 +85,8 @@ Other changes: desirable behavior. - Misc: Added IMGUI_DISABLE_STB_SPRINTF_IMPLEMENTATION config macro to disable stb_sprintf implementation when using IMGUI_USE_STB_SPRINTF. (#6626) [@septag] +- Misc: Avoid stb_textedit.h reincluding string.h while in a namespace, which + messes up with building with Clang Modules. (#6653, #4791) [@JohelEGP] - Demo: Better showcase use of SetNextItemAllowOverlap(). (#6574, #6512, #3909, #517) - Demo: Showcase a few more InputText() flags. - Backends: Made all backends sources files support global IMGUI_DISABLE. (#6601) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index d79d1e7c2be6..1f54616a84d6 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -3812,6 +3812,7 @@ static bool STB_TEXTEDIT_INSERTCHARS(ImGuiInputTextState* obj, int pos, const Im #define STB_TEXTEDIT_K_SHIFT 0x400000 #define STB_TEXTEDIT_IMPLEMENTATION +#define STB_TEXTEDIT_memmove memmove #include "imstb_textedit.h" // stb_textedit internally allows for a single undo record to do addition and deletion, but somehow, calling