LibJS: Add JS::make_handle(T&)
I'm not sure why we only had a T* variant of this.
This commit is contained in:
parent
13680ae038
commit
c26b58bc53
Notes:
sideshowbarker
2024-07-17 22:42:10 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c26b58bc535
1 changed files with 6 additions and 0 deletions
|
@ -71,4 +71,10 @@ inline Handle<T> make_handle(T* cell)
|
|||
return Handle<T>::create(cell);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline Handle<T> make_handle(T& cell)
|
||||
{
|
||||
return Handle<T>::create(&cell);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue