diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-02-13 20:47:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-13 23:02:57 +0100 |
commit | d6ea6c39a77c092ef32ffec2055065eed93f9daf (patch) | |
tree | 603d6e82598cb2e03731158163b5c62ff9000d9a /AK | |
parent | bfe1bd9726779fb324fe3f7bc3dde33fd1295fe6 (diff) | |
download | serenity-d6ea6c39a77c092ef32ffec2055065eed93f9daf.zip |
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.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/WeakPtr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/WeakPtr.h b/AK/WeakPtr.h index 210ffc9714..ded5a0d0c7 100644 --- a/AK/WeakPtr.h +++ b/AK/WeakPtr.h @@ -168,7 +168,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>(); |