1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:47:35 +00:00

AK: Forbid creating StringView from temporary FlyString

This commit is contained in:
Ben Wiederhake 2021-09-11 10:40:47 +02:00 committed by Idan Horowitz
parent f6d0955a46
commit 9413dddb8b

View file

@ -50,6 +50,7 @@ public:
explicit StringView(ByteBuffer&&) = delete; explicit StringView(ByteBuffer&&) = delete;
explicit StringView(String&&) = delete; explicit StringView(String&&) = delete;
explicit StringView(FlyString&&) = delete;
[[nodiscard]] constexpr bool is_null() const { return !m_characters; } [[nodiscard]] constexpr bool is_null() const { return !m_characters; }
[[nodiscard]] constexpr bool is_empty() const { return m_length == 0; } [[nodiscard]] constexpr bool is_empty() const { return m_length == 0; }