mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
AK+Kernel: Rename try_make_weak_ptr to make_weak_ptr_if_nonnull
This matches the likes of the adopt_{own, ref}_if_nonnull family and also frees up the name to allow us to eventually add OOM-fallible versions of these functions.
This commit is contained in:
parent
bfe1bd9726
commit
d6ea6c39a7
6 changed files with 6 additions and 6 deletions
|
@ -229,7 +229,7 @@ struct Formatter<WeakPtr<T>> : Formatter<const T*> {
|
|||
};
|
||||
|
||||
template<typename T>
|
||||
WeakPtr<T> try_make_weak_ptr(const T* ptr)
|
||||
WeakPtr<T> make_weak_ptr_if_nonnull(const T* ptr)
|
||||
{
|
||||
if (ptr) {
|
||||
return ptr->template make_weak_ptr<T>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue