1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:27:35 +00:00

Everywhere: Run clang-format

This commit is contained in:
Idan Horowitz 2022-04-01 20:58:27 +03:00 committed by Linus Groh
parent 0376c127f6
commit 086969277e
1665 changed files with 8479 additions and 8479 deletions

View file

@ -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(); }
};
}