mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 09:21:57 -05:00
AK: Pass (Deprecated)FlyString::is_one_of
arguments by reference
This avoid unnecessairy reference counting. (cherry picked from commit 22a66bb1c2afde93096d9866d6386e2bca955f71)
This commit is contained in:
parent
c591562b0d
commit
9614721bde
2 changed files with 2 additions and 2 deletions
|
@ -84,7 +84,7 @@ public:
|
|||
static void did_destroy_impl(Badge<StringImpl>, StringImpl&);
|
||||
|
||||
template<typename... Ts>
|
||||
[[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<Ts>(strings)));
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
[[nodiscard]] bool ends_with_bytes(StringView, CaseSensitivity = CaseSensitivity::CaseSensitive) const;
|
||||
|
||||
template<typename... Ts>
|
||||
[[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<Ts>(strings)));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue