From 22528d8db34810aba184c257d404e221f040bbb4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 11 Jul 2019 15:52:15 +0200 Subject: [PATCH] GLabel: Make set_icon() take a GraphicsBitmap*. Taking a RefPtr&& was just making things unnecessarily complicated for clients, and didn't actually improve anything. --- Libraries/LibGUI/GLabel.cpp | 4 ++-- Libraries/LibGUI/GLabel.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/LibGUI/GLabel.cpp b/Libraries/LibGUI/GLabel.cpp index cc1ac3e4a39..5a6fdc6580b 100644 --- a/Libraries/LibGUI/GLabel.cpp +++ b/Libraries/LibGUI/GLabel.cpp @@ -17,9 +17,9 @@ GLabel::~GLabel() { } -void GLabel::set_icon(RefPtr&& icon) +void GLabel::set_icon(GraphicsBitmap* icon) { - m_icon = move(icon); + m_icon = icon; } void GLabel::set_text(const StringView& text) diff --git a/Libraries/LibGUI/GLabel.h b/Libraries/LibGUI/GLabel.h index dffd0b70bdd..e3ad6a568ef 100644 --- a/Libraries/LibGUI/GLabel.h +++ b/Libraries/LibGUI/GLabel.h @@ -14,7 +14,7 @@ public: String text() const { return m_text; } void set_text(const StringView&); - void set_icon(RefPtr&&); + void set_icon(GraphicsBitmap*); const GraphicsBitmap* icon() const { return m_icon.ptr(); } GraphicsBitmap* icon() { return m_icon.ptr(); }