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

AK: Forbid creating StringView from temporary ByteBuffer

This commit is contained in:
Ben Wiederhake 2021-09-10 23:26:22 +02:00 committed by Idan Horowitz
parent e118ad3273
commit f6d0955a46

View file

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