1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 00:37:35 +00:00

Clipboard: Avoid unnecessary IPC::Dictionary wrapper

We already have and use HashMap<DeprecatedString, DeprecatedString>
nearly everywhere, which is equivalent.
This commit is contained in:
Ben Wiederhake 2023-05-14 23:04:47 +02:00 committed by Andreas Kling
parent 67d9172885
commit 0ee5a4e308
5 changed files with 13 additions and 8 deletions

View file

@ -17,7 +17,7 @@ RefPtr<Gfx::Bitmap> ConnectionToClipboardServer::get_bitmap()
if (clipping.mime_type() != "image/x-serenityos")
return nullptr;
HashMap<DeprecatedString, DeprecatedString> const& metadata = clipping.metadata().entries();
HashMap<DeprecatedString, DeprecatedString> const& metadata = clipping.metadata();
auto width = metadata.get("width").value_or("0").to_uint();
if (!width.has_value() || width.value() == 0)
return nullptr;