diff --git a/AK/DeprecatedFlyString.h b/AK/DeprecatedFlyString.h index ba709660e18..80087aa48f7 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 1e1cd169009..fd2c21e51a9 100644 --- a/AK/FlyString.h +++ b/AK/FlyString.h @@ -74,7 +74,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))); }