diff --git a/AK/FlyString.h b/AK/FlyString.h index ea6411c26b..19ddd37f72 100644 --- a/AK/FlyString.h +++ b/AK/FlyString.h @@ -89,9 +89,8 @@ public: static void did_destroy_impl(Badge, StringImpl&); - bool is_one_of() { return false; } template - bool is_one_of(const T& string, Rest... rest) + bool is_one_of(const T& string, Rest... rest) const { if (string == *this) return true; @@ -100,6 +99,8 @@ public: private: + bool is_one_of() const { return false; } + RefPtr m_impl; }; diff --git a/AK/String.h b/AK/String.h index 443a6b9549..6f99be9b5b 100644 --- a/AK/String.h +++ b/AK/String.h @@ -224,9 +224,8 @@ public: int replace(const String& needle, const String& replacement, bool all_occurences = false); - bool is_one_of() { return false; } template - bool is_one_of(const T& string, Rest... rest) + bool is_one_of(const T& string, Rest... rest) const { if (string == *this) return true; @@ -234,6 +233,8 @@ public: } private: + bool is_one_of() const { return false; } + RefPtr m_impl; };