1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:47:45 +00:00

GToolBar: Make add_action() take a GAction& instead of NonnullRefPtr&&.

There's very little reason to take NonnullRefPtr&& in arguments really.
You can avoid ref-count churn in the cases where ownership is transferred
from the caller to the callee, but that's a pretty unusual situation and
not worth optimizing for at this stage.
This commit is contained in:
Andreas Kling 2019-07-11 15:55:54 +02:00
parent 8327b12291
commit 7faf878e0a
2 changed files with 5 additions and 6 deletions

View file

@ -9,7 +9,7 @@ public:
explicit GToolBar(GWidget* parent);
virtual ~GToolBar() override;
void add_action(NonnullRefPtr<GAction>&&);
void add_action(GAction&);
void add_separator();
bool has_frame() const { return m_has_frame; }