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
|
@ -118,6 +118,8 @@ public:
|
|||
const X& operator*() const {
|
||||
return inner->data;
|
||||
}
|
||||
|
||||
VRc<VTable, Dyn> into_dyn() const { return *reinterpret_cast<const VRc<VTable, Dyn> *>(this); }
|
||||
};
|
||||
|
||||
template<typename VTable, typename X = Dyn>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue