From f6d0955a46d660bbcfabb1be292b0f405742a0f6 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Fri, 10 Sep 2021 23:26:22 +0200 Subject: [PATCH] AK: Forbid creating StringView from temporary ByteBuffer --- AK/StringView.h | 1 + 1 file changed, 1 insertion(+) diff --git a/AK/StringView.h b/AK/StringView.h index f67bab6196..bcd7af8508 100644 --- a/AK/StringView.h +++ b/AK/StringView.h @@ -48,6 +48,7 @@ public: StringView(const String&); StringView(const FlyString&); + explicit StringView(ByteBuffer&&) = delete; explicit StringView(String&&) = delete; [[nodiscard]] constexpr bool is_null() const { return !m_characters; }