mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-28 12:54:45 +00:00
Reduce the use of unsafe in corelib and in the rust backend
This commit is contained in:
parent
bbb2b487b9
commit
30b201d946
12 changed files with 89 additions and 122 deletions
|
@ -43,17 +43,16 @@ using internal::TouchArea;
|
|||
// these on the heap
|
||||
inline void dummy_destory(ComponentRef) { }
|
||||
|
||||
constexpr inline ItemTreeNode make_item_node(std::intptr_t offset,
|
||||
constexpr inline ItemTreeNode<uint8_t> make_item_node(std::uintptr_t offset,
|
||||
const internal::ItemVTable *vtable,
|
||||
uint32_t child_count, uint32_t child_index)
|
||||
{
|
||||
return ItemTreeNode { ItemTreeNode::Tag::Item,
|
||||
{ ItemTreeNode::Item_Body { offset, vtable, child_count,
|
||||
return ItemTreeNode<uint8_t> { ItemTreeNode<uint8_t>::Tag::Item,
|
||||
{ ItemTreeNode<uint8_t>::Item_Body { {vtable, offset}, child_count,
|
||||
child_index } } };
|
||||
}
|
||||
|
||||
// FIXME: this should have a better name
|
||||
using internal::visit_item_tree;
|
||||
using internal::sixtyfps_visit_item_tree;
|
||||
|
||||
// layouts:
|
||||
using internal::Slice;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue