summaryrefslogtreecommitdiff
path: root/AK/FlyString.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-29 21:44:06 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-30 11:31:49 +0200
commit643464c455cf94f270bb6656b4a15b157b4a400c (patch)
treec7b03907ec6e3f958e6a04ea73f5b117f9c4c682 /AK/FlyString.h
parent2b1517f2151fa8e3474c4f9dd37cef21b932710f (diff)
downloadserenity-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.h5
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;
};