Skip to content

Commit

Permalink
imgui_stdlib: Fix warning (#6658)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohelEGP authored Jul 28, 2023
1 parent 79d6f4e commit 556ce9f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions misc/cpp/imgui_stdlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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

0 comments on commit 556ce9f

Please sign in to comment.