diff options
author | Andreas Kling <kling@serenityos.org> | 2021-04-23 16:46:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-23 16:46:57 +0200 |
commit | b91c49364df1683c7fe1191eb02b8d9c331874f6 (patch) | |
tree | a9ea5ff8e4cc8cfcfe75c279551be35793d0ffb3 /Userland/Libraries/LibGUI/Action.cpp | |
parent | b3db01e20eeae632cc75df9af8666772bda67091 (diff) | |
download | serenity-b91c49364df1683c7fe1191eb02b8d9c331874f6.zip |
AK: Rename adopt() to adopt_ref()
This makes it more symmetrical with adopt_own() (which is used to
create a NonnullOwnPtr from the result of a naked new.)
Diffstat (limited to 'Userland/Libraries/LibGUI/Action.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/Action.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Userland/Libraries/LibGUI/Action.cpp b/Userland/Libraries/LibGUI/Action.cpp index 666bbbf595..64aee3d101 100644 --- a/Userland/Libraries/LibGUI/Action.cpp +++ b/Userland/Libraries/LibGUI/Action.cpp @@ -158,42 +158,42 @@ NonnullRefPtr<Action> make_properties_action(Function<void(Action&)> callback, C NonnullRefPtr<Action> Action::create(String text, Function<void(Action&)> callback, Core::Object* parent) { - return adopt(*new Action(move(text), move(callback), parent)); + return adopt_ref(*new Action(move(text), move(callback), parent)); } NonnullRefPtr<Action> Action::create(String text, RefPtr<Gfx::Bitmap> icon, Function<void(Action&)> callback, Core::Object* parent) { - return adopt(*new Action(move(text), move(icon), move(callback), parent)); + return adopt_ref(*new Action(move(text), move(icon), move(callback), parent)); } NonnullRefPtr<Action> Action::create(String text, const Shortcut& shortcut, Function<void(Action&)> callback, Core::Object* parent) { - return adopt(*new Action(move(text), shortcut, move(callback), parent)); + return adopt_ref(*new Action(move(text), shortcut, move(callback), parent)); } NonnullRefPtr<Action> Action::create(String text, const Shortcut& shortcut, RefPtr<Gfx::Bitmap> icon, Function<void(Action&)> callback, Core::Object* parent) { - return adopt(*new Action(move(text), shortcut, move(icon), move(callback), parent)); + return adopt_ref(*new Action(move(text), shortcut, move(icon), move(callback), parent)); } NonnullRefPtr<Action> Action::create_checkable(String text, Function<void(Action&)> callback, Core::Object* parent) { - return adopt(*new Action(move(text), move(callback), parent, true)); + return adopt_ref(*new Action(move(text), move(callback), parent, true)); } NonnullRefPtr<Action> Action::create_checkable(String text, RefPtr<Gfx::Bitmap> icon, Function<void(Action&)> callback, Core::Object* parent) { - return adopt(*new Action(move(text), move(icon), move(callback), parent, true)); + return adopt_ref(*new Action(move(text), move(icon), move(callback), parent, true)); } NonnullRefPtr<Action> Action::create_checkable(String text, const Shortcut& shortcut, Function<void(Action&)> callback, Core::Object* parent) { - return adopt(*new Action(move(text), shortcut, move(callback), parent, true)); + return adopt_ref(*new Action(move(text), shortcut, move(callback), parent, true)); } NonnullRefPtr<Action> Action::create_checkable(String text, const Shortcut& shortcut, RefPtr<Gfx::Bitmap> icon, Function<void(Action&)> callback, Core::Object* parent) { - return adopt(*new Action(move(text), shortcut, move(icon), move(callback), parent, true)); + return adopt_ref(*new Action(move(text), shortcut, move(icon), move(callback), parent, true)); } Action::Action(String text, Function<void(Action&)> on_activation_callback, Core::Object* parent, bool checkable) |