mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:07:34 +00:00
Everywhere: Pass AK::ReadonlyBytes by value
This commit is contained in:
parent
8b1108e485
commit
80d4e830a0
42 changed files with 96 additions and 96 deletions
|
@ -111,7 +111,7 @@ RefPtr<Gfx::Bitmap> Clipboard::bitmap() const
|
|||
return bitmap;
|
||||
}
|
||||
|
||||
void Clipboard::set_data(ReadonlyBytes const& data, String const& type, HashMap<String, String> const& metadata)
|
||||
void Clipboard::set_data(ReadonlyBytes data, String const& type, HashMap<String, String> const& metadata)
|
||||
{
|
||||
auto buffer_or_error = Core::AnonymousBuffer::create_with_size(data.size());
|
||||
if (buffer_or_error.is_error()) {
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
String mime_type() const { return data_and_type().mime_type; }
|
||||
RefPtr<Gfx::Bitmap> bitmap() const;
|
||||
|
||||
void set_data(ReadonlyBytes const& data, String const& mime_type = "text/plain", HashMap<String, String> const& metadata = {});
|
||||
void set_data(ReadonlyBytes data, String const& mime_type = "text/plain", HashMap<String, String> const& metadata = {});
|
||||
void set_plain_text(String const& text) { set_data(text.bytes()); }
|
||||
void set_bitmap(Gfx::Bitmap const&);
|
||||
void clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue