Browse Source

LibGUI: Make Clipboard::set_plain_text take text as a StringView

Karol Kosek 2 năm trước cách đây
mục cha
commit
61b49daf0a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Userland/Libraries/LibGUI/Clipboard.h

+ 1 - 1
Userland/Libraries/LibGUI/Clipboard.h

@@ -43,7 +43,7 @@ public:
     DeprecatedString fetch_mime_type() const { return fetch_data_and_type().mime_type; }
 
     void set_data(ReadonlyBytes data, DeprecatedString const& mime_type = "text/plain", HashMap<DeprecatedString, DeprecatedString> const& metadata = {});
-    void set_plain_text(DeprecatedString const& text) { set_data(text.bytes()); }
+    void set_plain_text(StringView text) { set_data(text.bytes()); }
     void set_bitmap(Gfx::Bitmap const&, HashMap<DeprecatedString, DeprecatedString> const& additional_metadata = {});
     void clear();