1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +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:
Idan Horowitz 2022-02-13 20:47:36 +02:00 committed by Andreas Kling
parent bfe1bd9726
commit d6ea6c39a7
6 changed files with 6 additions and 6 deletions

View file

@ -214,7 +214,7 @@ void Action::set_checked(bool checked)
void Action::set_group(Badge<ActionGroup>, ActionGroup* group)
{
m_action_group = AK::try_make_weak_ptr(group);
m_action_group = AK::make_weak_ptr_if_nonnull(group);
}
void Action::set_icon(const Gfx::Bitmap* icon)