diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2021-11-28 22:20:28 +0100 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-12-08 09:46:13 -0800 |
commit | 643ec036088d6596428921380e111d0da2660821 (patch) | |
tree | 683057f6dc30fa2852ed98e50f6ecaa0f477f973 /Userland | |
parent | 768b70cc4dd53b927ef7384652c2e778325b93e2 (diff) | |
download | serenity-643ec036088d6596428921380e111d0da2660821.zip |
LibCore: Avoid implicitly copying ByteBuffer
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibCore/MimeData.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibCore/MimeData.h b/Userland/Libraries/LibCore/MimeData.h index cdaf8686d0..71c9f32a9c 100644 --- a/Userland/Libraries/LibCore/MimeData.h +++ b/Userland/Libraries/LibCore/MimeData.h @@ -20,7 +20,7 @@ public: virtual ~MimeData() { } ByteBuffer data(const String& mime_type) const { return m_data.get(mime_type).value_or({}); } - void set_data(const String& mime_type, const ByteBuffer& data) { m_data.set(mime_type, data); } + void set_data(const String& mime_type, ByteBuffer&& data) { m_data.set(mime_type, move(data)); } bool has_format(const String& mime_type) const { return m_data.contains(mime_type); } Vector<String> formats() const; |