mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Add an into_dyn helper function to C++ VRc
This will be used in more places in the future, so centralize the ugly re-interpret cast.
This commit is contained in:
parent
8b76114083
commit
9c998c9e56
2 changed files with 4 additions and 3 deletions
|
@ -116,9 +116,8 @@ public:
|
|||
template<typename Component>
|
||||
void set_component(const Component &c) const
|
||||
{
|
||||
auto self_rc = c.self_weak.lock().value();
|
||||
sixtyfps_component_window_set_component(
|
||||
&inner, reinterpret_cast<cbindgen_private::ComponentRc *>(&self_rc));
|
||||
auto self_rc = c.self_weak.lock().value().into_dyn();
|
||||
sixtyfps_component_window_set_component(&inner, &self_rc);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue