зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1305422 - part 3 - don't call size_forward in nsTStringComparator.cpp; r=erahm
Asking for size_forward on an iterator that you haven't started reading from is just asking for the length of the original string, so use that instead.
This commit is contained in:
Родитель
d59bcecbbd
Коммит
17702bc8dd
|
@ -19,8 +19,8 @@ Compare(const nsTSubstring_CharT::base_string_type& aLhs,
|
|||
aLhs.BeginReading(leftIter);
|
||||
aRhs.BeginReading(rightIter);
|
||||
|
||||
size_type lLength = leftIter.size_forward();
|
||||
size_type rLength = rightIter.size_forward();
|
||||
size_type lLength = aLhs.Length();
|
||||
size_type rLength = aRhs.Length();
|
||||
size_type lengthToCompare = XPCOM_MIN(lLength, rLength);
|
||||
|
||||
int result;
|
||||
|
|
Загрузка…
Ссылка в новой задаче