mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Make a pass to remove the Expression::Return instruction
So it doesn't appear in the LLR and the C++ codegen can be simplified. In particular, this removes the need to throw/catch exception to handle return across generated lambdas
This commit is contained in:
parent
a565ed53fd
commit
cf19749943
11 changed files with 511 additions and 96 deletions
|
@ -117,16 +117,6 @@ inline vtable::Layout drop_in_place(ComponentRef component)
|
|||
# endif
|
||||
#endif // !defined(DOXYGEN)
|
||||
|
||||
template<typename T>
|
||||
struct ReturnWrapper
|
||||
{
|
||||
ReturnWrapper(T val) : value(std::move(val)) { }
|
||||
T value;
|
||||
};
|
||||
template<>
|
||||
struct ReturnWrapper<void>
|
||||
{
|
||||
};
|
||||
} // namespace private_api
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue