mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 22:01:13 +00:00
Avoid strict aliasing warning
This commit is contained in:
parent
4a79498761
commit
d37856b754
1 changed files with 3 additions and 2 deletions
|
@ -625,11 +625,12 @@ public:
|
|||
{
|
||||
union CI {
|
||||
cbindgen_private::ComponentInstance i;
|
||||
~CI() { i.~ComponentInstance(); }
|
||||
ComponentHandle<ComponentInstance> result;
|
||||
~CI() { result.~ComponentHandle(); }
|
||||
CI() { }
|
||||
} u;
|
||||
cbindgen_private::sixtyfps_interpreter_component_instance_create(&inner, &u.i);
|
||||
return *reinterpret_cast<ComponentHandle<ComponentInstance> *>(&u.i);
|
||||
return u.result;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue