diff --git a/AK/DeprecatedFlyString.h b/AK/DeprecatedFlyString.h index d952f5e1bef..1242fb0d696 100644 --- a/AK/DeprecatedFlyString.h +++ b/AK/DeprecatedFlyString.h @@ -84,7 +84,7 @@ public: static void did_destroy_impl(Badge, StringImpl&); template - [[nodiscard]] ALWAYS_INLINE constexpr bool is_one_of(Ts... strings) const + [[nodiscard]] ALWAYS_INLINE constexpr bool is_one_of(Ts&&... strings) const { return (... || this->operator==(forward(strings))); } diff --git a/AK/FlyString.h b/AK/FlyString.h index 90ca5d16694..d6d6a7103c8 100644 --- a/AK/FlyString.h +++ b/AK/FlyString.h @@ -71,7 +71,7 @@ public: [[nodiscard]] bool ends_with_bytes(StringView, CaseSensitivity = CaseSensitivity::CaseSensitive) const; template - [[nodiscard]] ALWAYS_INLINE constexpr bool is_one_of(Ts... strings) const + [[nodiscard]] ALWAYS_INLINE constexpr bool is_one_of(Ts&&... strings) const { return (... || this->operator==(forward(strings))); }