diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-29 21:44:06 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-30 11:31:49 +0200 |
commit | 643464c455cf94f270bb6656b4a15b157b4a400c (patch) | |
tree | c7b03907ec6e3f958e6a04ea73f5b117f9c4c682 /AK/FlyString.h | |
parent | 2b1517f2151fa8e3474c4f9dd37cef21b932710f (diff) | |
download | serenity-643464c455cf94f270bb6656b4a15b157b4a400c.zip |
AK: Make {String,FlyString}::is_one_of() const
Also, make the zero-argument variant private since it's not meant to be
called by clients directly.
Diffstat (limited to 'AK/FlyString.h')
-rw-r--r-- | AK/FlyString.h | 5 |
1 files changed, 3 insertions, 2 deletions
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>, StringImpl&); - bool is_one_of() { return false; } template<typename T, typename... Rest> - 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<StringImpl> m_impl; }; |