From 556ce9f543a311455d980912e24131b45f2cf769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Fri, 28 Jul 2023 08:15:10 -0400 Subject: [PATCH] imgui_stdlib: Fix warning (#6658) --- misc/cpp/imgui_stdlib.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/misc/cpp/imgui_stdlib.cpp b/misc/cpp/imgui_stdlib.cpp index c9060e88..cf69aa89 100644 --- a/misc/cpp/imgui_stdlib.cpp +++ b/misc/cpp/imgui_stdlib.cpp @@ -10,6 +10,12 @@ #include "imgui.h" #include "imgui_stdlib.h" +// Clang warnings with -Weverything +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness +#endif + struct InputTextCallback_UserData { std::string* Str; @@ -73,3 +79,7 @@ bool ImGui::InputTextWithHint(const char* label, const char* hint, std::string* cb_user_data.ChainCallbackUserData = user_data; return InputTextWithHint(label, hint, (char*)str->c_str(), str->capacity() + 1, flags, InputTextCallback, &cb_user_data); } + +#if defined(__clang__) +#pragma clang diagnostic pop +#endif