From 9413dddb8b541fae2d2d3bc290556c1012dde4b3 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sat, 11 Sep 2021 10:40:47 +0200 Subject: [PATCH] AK: Forbid creating StringView from temporary FlyString --- AK/StringView.h | 1 + 1 file changed, 1 insertion(+) diff --git a/AK/StringView.h b/AK/StringView.h index bcd7af8508..ba87d2c0c1 100644 --- a/AK/StringView.h +++ b/AK/StringView.h @@ -50,6 +50,7 @@ public: explicit StringView(ByteBuffer&&) = delete; explicit StringView(String&&) = delete; + explicit StringView(FlyString&&) = delete; [[nodiscard]] constexpr bool is_null() const { return !m_characters; } [[nodiscard]] constexpr bool is_empty() const { return m_length == 0; }