From ec04e8bb050ef42f25aee6e5748f4e0e153266bf Mon Sep 17 00:00:00 2001 From: Elias Daler Date: Wed, 12 Sep 2018 23:58:45 +0300 Subject: [PATCH] Fix MSVC's C4312 warning about casting user texture type to void* in ImageButton (#2080) --- imgui_widgets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 56cbf33d0..89e6f10d2 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -838,7 +838,7 @@ bool ImGui::ImageButton(ImTextureID user_texture_id, const ImVec2& size, const I // Default to using texture ID as ID. User can still push string/integer prefixes. // We could hash the size/uv to create a unique ID but that would prevent the user from animating UV. - PushID((void*)user_texture_id); + PushID((void*)(intptr_t)user_texture_id); const ImGuiID id = window->GetID("#image"); PopID();