Revert "Add length-equality test in String operator== checks."
This reverts commit e28210d401ae4ed1258b84c9b17a172a757190e8.
This commit is contained in:
parent
2881c85e38
commit
9d589aa0d6
2 changed files with 2 additions and 6 deletions
|
|
@ -205,9 +205,7 @@ inline bool String16::operator<=(const String16& other) const
|
|||
|
||||
inline bool String16::operator==(const String16& other) const
|
||||
{
|
||||
const size_t n1 = size();
|
||||
const size_t n2 = other.size();
|
||||
return n1 == n2 && strzcmp16(mString, n1, other.mString, n2) == 0;
|
||||
return strzcmp16(mString, size(), other.mString, other.size()) == 0;
|
||||
}
|
||||
|
||||
inline bool String16::operator!=(const String16& other) const
|
||||
|
|
|
|||
|
|
@ -418,9 +418,7 @@ inline bool String8::operator<=(const String8& other) const
|
|||
|
||||
inline bool String8::operator==(const String8& other) const
|
||||
{
|
||||
return (SharedBuffer::sizeFromData(mString) ==
|
||||
SharedBuffer::sizeFromData(other.mString)) &&
|
||||
strcmp(mString, other.mString) == 0;
|
||||
return strcmp(mString, other.mString) == 0;
|
||||
}
|
||||
|
||||
inline bool String8::operator!=(const String8& other) const
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue