mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05: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() { }
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue