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:
Nathan Froyd 2016-09-29 22:33:58 -04:00
Родитель d59bcecbbd
Коммит 17702bc8dd
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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;