mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:07:35 +00:00
LibCore: Avoid implicitly copying ByteBuffer
This commit is contained in:
parent
768b70cc4d
commit
643ec03608
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ public:
|
||||||
virtual ~MimeData() { }
|
virtual ~MimeData() { }
|
||||||
|
|
||||||
ByteBuffer data(const String& mime_type) const { return m_data.get(mime_type).value_or({}); }
|
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); }
|
bool has_format(const String& mime_type) const { return m_data.contains(mime_type); }
|
||||||
Vector<String> formats() const;
|
Vector<String> formats() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue