summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2020-09-06 01:10:33 +0200
committerAndreas Kling <kling@serenityos.org>2020-09-12 00:13:29 +0200
commitd6673b384efe02b0d8aa3f0abd58c51afb278485 (patch)
treed54f15648ca1ce2e10c17576c315b95ea1e1bdce /Libraries/LibGUI
parent25ccd40d5a5f39f43e548498c06996cc2e721c1f (diff)
downloadserenity-d6673b384efe02b0d8aa3f0abd58c51afb278485.zip
LibGfx: Remove redundant bits() method
In all circumstances, this returned exactly the same thing as scanline_u8(), so let's just remove the silly detour. This does not add any new dependency on Bitmap-internals, because that already existed.
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r--Libraries/LibGUI/Menu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGUI/Menu.cpp b/Libraries/LibGUI/Menu.cpp
index 49d01773c1..71c162edf2 100644
--- a/Libraries/LibGUI/Menu.cpp
+++ b/Libraries/LibGUI/Menu.cpp
@@ -118,7 +118,7 @@ static int ensure_realized_icon(IconContainerType& container)
auto shared_buffer = SharedBuffer::create_with_size(container.icon()->size_in_bytes());
ASSERT(shared_buffer);
auto shared_icon = Gfx::Bitmap::create_with_shared_buffer(Gfx::BitmapFormat::RGBA32, *shared_buffer, container.icon()->size());
- memcpy(shared_buffer->data(), container.icon()->bits(0), container.icon()->size_in_bytes());
+ memcpy(shared_buffer->data(), container.icon()->scanline_u8(0), container.icon()->size_in_bytes());
shared_buffer->seal();
shared_buffer->share_with(WindowServerConnection::the().server_pid());
container.set_icon(shared_icon);