summaryrefslogtreecommitdiff
path: root/AK/FlyString.h
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-04-01 20:58:27 +0300
committerLinus Groh <mail@linusgroh.de>2022-04-01 21:24:45 +0100
commit086969277e74d8ba065bf8145d3aeb0dec0bfee5 (patch)
tree02b3699a66735ef806d9b46353491f18f8e4e7b4 /AK/FlyString.h
parent0376c127f6e98e03607700d0b3f5154b7014b2f8 (diff)
downloadserenity-086969277e74d8ba065bf8145d3aeb0dec0bfee5.zip
Everywhere: Run clang-format
Diffstat (limited to 'AK/FlyString.h')
-rw-r--r--AK/FlyString.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/AK/FlyString.h b/AK/FlyString.h
index 8c8d55dad0..c81eb65e48 100644
--- a/AK/FlyString.h
+++ b/AK/FlyString.h
@@ -14,7 +14,7 @@ namespace AK {
class FlyString {
public:
FlyString() = default;
- FlyString(const FlyString& other)
+ FlyString(FlyString const& other)
: m_impl(other.impl())
{
}
@@ -22,9 +22,9 @@ public:
: m_impl(move(other.m_impl))
{
}
- FlyString(const String&);
+ FlyString(String const&);
FlyString(StringView);
- FlyString(const char* string)
+ FlyString(char const* string)
: FlyString(static_cast<String>(string))
{
}
@@ -37,7 +37,7 @@ public:
return string;
}
- FlyString& operator=(const FlyString& other)
+ FlyString& operator=(FlyString const& other)
{
m_impl = other.m_impl;
return *this;
@@ -52,20 +52,20 @@ public:
bool is_empty() const { return !m_impl || !m_impl->length(); }
bool is_null() const { return !m_impl; }
- bool operator==(const FlyString& other) const { return m_impl == other.m_impl; }
- bool operator!=(const FlyString& other) const { return m_impl != other.m_impl; }
+ bool operator==(FlyString const& other) const { return m_impl == other.m_impl; }
+ bool operator!=(FlyString const& other) const { return m_impl != other.m_impl; }
- bool operator==(const String&) const;
- bool operator!=(const String& string) const { return !(*this == string); }
+ bool operator==(String const&) const;
+ bool operator!=(String const& string) const { return !(*this == string); }
bool operator==(StringView) const;
bool operator!=(StringView string) const { return !(*this == string); }
- bool operator==(const char*) const;
- bool operator!=(const char* string) const { return !(*this == string); }
+ bool operator==(char const*) const;
+ bool operator!=(char const* string) const { return !(*this == string); }
- const StringImpl* impl() const { return m_impl; }
- const char* characters() const { return m_impl ? m_impl->characters() : nullptr; }
+ StringImpl const* impl() const { return m_impl; }
+ char const* characters() const { return m_impl ? m_impl->characters() : nullptr; }
size_t length() const { return m_impl ? m_impl->length() : 0; }
ALWAYS_INLINE u32 hash() const { return m_impl ? m_impl->existing_hash() : 0; }
@@ -96,7 +96,7 @@ private:
template<>
struct Traits<FlyString> : public GenericTraits<FlyString> {
- static unsigned hash(const FlyString& s) { return s.hash(); }
+ static unsigned hash(FlyString const& s) { return s.hash(); }
};
}