Bug 575014: cast pointer-subtraction in nsTArray to produce index_type instead of (64-bit) size_t, to fix build warning on Win64. (bustage fix) rs=timeless pending-r=bsmedberg

This commit is contained in:
Daniel Holbert 2010-06-26 17:50:36 -07:00
parent acc8eb35f1
commit cb6a1a06d6

View File

@ -444,7 +444,7 @@ class nsTArray : public nsTArray_base {
const elem_type* end = Elements() - 1, *iter = end + start + 1;
for (; iter != end; --iter) {
if (comp.Equals(*iter, item))
return iter - Elements();
return index_type(iter - Elements());
}
return NoIndex;
}