Skip to content

Commit

Permalink
Switch bit_cast for static_cast in ui_graphics_backend.cpp (wasm comp…
Browse files Browse the repository at this point in the history
…atiblity)
  • Loading branch information
adamkewley committed Nov 12, 2024
1 parent 3718b9b commit a34423d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/oscar/UI/ui_graphics_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ namespace
ImTextureID to_imgui_texture_id(UID id)
{
static_assert(std::is_same_v<ImTextureID, osc::ui::graphics_backend::InternalTextureID>);
return cpp20::bit_cast<ImTextureID>(id);
return static_cast<ImTextureID>(id.get());
}

UID to_uid(ImTextureID id)
{
return UID::from_int_unchecked(cpp20::bit_cast<UID::element_type>(id));
return UID::from_int_unchecked(static_cast<UID::element_type>(id));
}

Texture2D create_font_texture(UID texture_id)
Expand Down

0 comments on commit a34423d

Please sign in to comment.