summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Icon.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-02-20 19:03:44 +0100
committerAndreas Kling <kling@serenityos.org>2023-02-21 00:54:04 +0100
commitfaa1a09042d61724417e78db8283b73f3393f77f (patch)
treed9bb9b392f58a37ecb825a89374df2113409191e /Userland/Libraries/LibGUI/Icon.h
parentbfe081caadceaabf9104fbc464d15d705752a78f (diff)
downloadserenity-faa1a09042d61724417e78db8283b73f3393f77f.zip
LibGUI: Fix const-correctness issues
Diffstat (limited to 'Userland/Libraries/LibGUI/Icon.h')
-rw-r--r--Userland/Libraries/LibGUI/Icon.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibGUI/Icon.h b/Userland/Libraries/LibGUI/Icon.h
index b11cbcf42b..111e0cf7ba 100644
--- a/Userland/Libraries/LibGUI/Icon.h
+++ b/Userland/Libraries/LibGUI/Icon.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Julius Heijmen <julius.heijmen@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
@@ -21,7 +21,7 @@ public:
~IconImpl() = default;
Gfx::Bitmap const* bitmap_for_size(int) const;
- void set_bitmap_for_size(int, RefPtr<Gfx::Bitmap>&&);
+ void set_bitmap_for_size(int, RefPtr<Gfx::Bitmap const>&&);
Vector<int> sizes() const
{
@@ -33,14 +33,14 @@ public:
private:
IconImpl() = default;
- HashMap<int, RefPtr<Gfx::Bitmap>> m_bitmaps;
+ HashMap<int, RefPtr<Gfx::Bitmap const>> m_bitmaps;
};
class Icon {
public:
Icon();
- explicit Icon(RefPtr<Gfx::Bitmap>&&);
- explicit Icon(RefPtr<Gfx::Bitmap>&&, RefPtr<Gfx::Bitmap>&&);
+ explicit Icon(RefPtr<Gfx::Bitmap const>&&);
+ explicit Icon(RefPtr<Gfx::Bitmap const>&&, RefPtr<Gfx::Bitmap const>&&);
explicit Icon(IconImpl const&);
Icon(Icon const&);
~Icon() = default;
@@ -56,7 +56,7 @@ public:
}
Gfx::Bitmap const* bitmap_for_size(int size) const { return m_impl->bitmap_for_size(size); }
- void set_bitmap_for_size(int size, RefPtr<Gfx::Bitmap>&& bitmap) { m_impl->set_bitmap_for_size(size, move(bitmap)); }
+ void set_bitmap_for_size(int size, RefPtr<Gfx::Bitmap const>&& bitmap) { m_impl->set_bitmap_for_size(size, move(bitmap)); }
IconImpl const& impl() const { return *m_impl; }