LibGUI: Use HashMap::keys() to hand out the available sizes of icons

This commit is contained in:
Hendiadyoin1 2024-03-01 14:19:54 +01:00 committed by Andrew Kaster
parent e1c663ba27
commit 2537efaf64
Notes: sideshowbarker 2024-07-17 05:23:40 +09:00

View File

@ -23,13 +23,7 @@ public:
Gfx::Bitmap const* bitmap_for_size(int) const; Gfx::Bitmap const* bitmap_for_size(int) const;
void set_bitmap_for_size(int, RefPtr<Gfx::Bitmap const>&&); void set_bitmap_for_size(int, RefPtr<Gfx::Bitmap const>&&);
Vector<int> sizes() const Vector<int> sizes() const { return m_bitmaps.keys(); }
{
Vector<int> sizes;
for (auto& it : m_bitmaps)
sizes.append(it.key);
return sizes;
}
private: private:
IconImpl() = default; IconImpl() = default;