mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Add a dummy indirection in C++ for the item vtable access
This will allow for a compile-time decision in the future whether to use the vtable symbol or getter function.
This commit is contained in:
parent
c84e6d2945
commit
4198513832
3 changed files with 33 additions and 16 deletions
|
@ -204,6 +204,12 @@ inline vtable::Layout drop_in_place(ComponentRef component)
|
|||
return vtable::Layout { sizeof(T), alignof(T) };
|
||||
}
|
||||
|
||||
template<typename VTableType>
|
||||
constexpr inline const VTableType *get_vtable(const VTableType *vtable_symbol)
|
||||
{
|
||||
return vtable_symbol;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
struct ReturnWrapper
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue