1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-05 20:54:44 +00:00

Revert "AK: Always inline FlyString::view()"

This reverts commit 66f15c2e0c.
This commit is contained in:
Linus Groh 2021-06-06 01:58:09 +01:00
parent 0bf597e99d
commit f09216ac42
3 changed files with 7 additions and 2 deletions

View File

@ -115,6 +115,11 @@ FlyString FlyString::to_lowercase() const
return String(*m_impl).to_lowercase();
}
StringView FlyString::view() const
{
return { characters(), length() };
}
bool FlyString::operator==(const String& other) const
{
if (m_impl == other.impl())

View File

@ -60,7 +60,8 @@ public:
size_t length() const { return m_impl ? m_impl->length() : 0; }
ALWAYS_INLINE u32 hash() const { return m_impl ? m_impl->existing_hash() : 0; }
ALWAYS_INLINE StringView view() const { return m_impl ? m_impl->view() : StringView {}; }
StringView view() const;
FlyString to_lowercase() const;

View File

@ -43,7 +43,6 @@ public:
const char* characters() const { return &m_inline_buffer[0]; }
ALWAYS_INLINE ReadonlyBytes bytes() const { return { characters(), length() }; }
ALWAYS_INLINE StringView view() const { return { characters(), length() }; }
const char& operator[](size_t i) const
{