mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-05 09:52:54 +00:00
AK: Move StringImpl::operator== implementation into StringImpl
This commit is contained in:
parent
ee9c18c118
commit
cc765e14ca
Notes:
sideshowbarker
2024-07-19 02:02:14 +09:00
Author: https://github.com/nico
Commit: cc765e14ca
Pull-request: https://github.com/SerenityOS/serenity/pull/3693
Reviewed-by: https://github.com/awesomekling
3 changed files with 9 additions and 8 deletions
|
@ -60,10 +60,7 @@ bool String::operator==(const String& other) const
|
|||
if (!other.m_impl)
|
||||
return false;
|
||||
|
||||
if (length() != other.length())
|
||||
return false;
|
||||
|
||||
return !memcmp(characters(), other.characters(), length());
|
||||
return *m_impl == *other.m_impl;
|
||||
}
|
||||
|
||||
bool String::operator==(const StringView& other) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue