mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09: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
Notes:
sideshowbarker
2024-07-17 18:53:13 +09:00
Author: https://github.com/IdanHo
Commit: d6ea6c39a7
Pull-request: https://github.com/SerenityOS/serenity/pull/12501
6 changed files with 6 additions and 6 deletions
|
@ -13,7 +13,7 @@ namespace Core {
|
|||
ChildEvent::ChildEvent(Type type, Object& child, Object* insertion_before_child)
|
||||
: Core::Event(type)
|
||||
, m_child(child.make_weak_ptr())
|
||||
, m_insertion_before_child(AK::try_make_weak_ptr(insertion_before_child))
|
||||
, m_insertion_before_child(AK::make_weak_ptr_if_nonnull(insertion_before_child))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue