summaryrefslogtreecommitdiffstats
path: root/xpcom/ds/nsTArray.h
diff options
context:
space:
mode:
Diffstat (limited to 'xpcom/ds/nsTArray.h')
-rw-r--r--xpcom/ds/nsTArray.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/xpcom/ds/nsTArray.h b/xpcom/ds/nsTArray.h
index f17624b721..56f926ccad 100644
--- a/xpcom/ds/nsTArray.h
+++ b/xpcom/ds/nsTArray.h
@@ -2379,9 +2379,10 @@ class nsTArray_Impl
static_assert(std::is_move_constructible_v<value_type>);
::detail::CompareWrapper<Comparator, value_type> comp(aComp);
- std::sort(begin(), end(), [&comp](const auto& left, const auto& right) {
- return comp.LessThan(left, right);
- });
+ std::sort(Elements(), Elements() + Length(),
+ [&comp](const auto& left, const auto& right) {
+ return comp.LessThan(left, right);
+ });
}
// A variation on the Sort method defined above that assumes that