浏览代码

LibGUI: Make Label::set_icon() take a const Gfx::Bitmap*

Andreas Kling 5 年之前
父节点
当前提交
ae9fe60412
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      Libraries/LibGUI/Label.cpp
  2. 1 1
      Libraries/LibGUI/Label.h

+ 1 - 1
Libraries/LibGUI/Label.cpp

@@ -44,7 +44,7 @@ Label::~Label()
 {
 }
 
-void Label::set_icon(Gfx::Bitmap* icon)
+void Label::set_icon(const Gfx::Bitmap* icon)
 {
     if (m_icon == icon)
         return;

+ 1 - 1
Libraries/LibGUI/Label.h

@@ -39,7 +39,7 @@ public:
     String text() const { return m_text; }
     void set_text(const StringView&);
 
-    void set_icon(Gfx::Bitmap*);
+    void set_icon(const Gfx::Bitmap*);
     const Gfx::Bitmap* icon() const { return m_icon.ptr(); }
     Gfx::Bitmap* icon() { return m_icon.ptr(); }