mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
AK: Move StringImpl::operator== implementation into StringImpl
This commit is contained in:
parent
ee9c18c118
commit
cc765e14ca
3 changed files with 9 additions and 8 deletions
|
@ -70,6 +70,13 @@ public:
|
|||
return characters()[i];
|
||||
}
|
||||
|
||||
bool operator==(const StringImpl& other) const
|
||||
{
|
||||
if (length() != other.length())
|
||||
return false;
|
||||
return !__builtin_memcmp(characters(), other.characters(), length());
|
||||
}
|
||||
|
||||
unsigned hash() const
|
||||
{
|
||||
if (!m_has_hash)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue