Skip to content

Commit ec04e8b

Browse files
eliasdalerocornut
authored andcommitted
Fix MSVC's C4312 warning about casting user texture type to void* in ImageButton (#2080)
1 parent 9cc63ba commit ec04e8b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

imgui_widgets.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ bool ImGui::ImageButton(ImTextureID user_texture_id, const ImVec2& size, const I
838838

839839
// Default to using texture ID as ID. User can still push string/integer prefixes.
840840
// We could hash the size/uv to create a unique ID but that would prevent the user from animating UV.
841-
PushID((void*)user_texture_id);
841+
PushID((void*)(intptr_t)user_texture_id);
842842
const ImGuiID id = window->GetID("#image");
843843
PopID();
844844

0 commit comments

Comments
 (0)