Const-ify return type of the const overloadings of SafeElementAt() in nsTArray

NEW
Unassigned

Status

()

Core
XPCOM
3 years ago
3 years ago

People

(Reporter: njn, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
Bug 1237151 identified that the return value of the const overloadings of SafeElementAt() in nsTArray weren't as const as they seem, due to the presence of a typedef. Like so:

> // XXX: Probably should return const_elem_type, but callsites must be fixed.
> elem_type SafeElementAt(index_type aIndex) const

This should be fixed.
You need to log in before you can comment on or make changes to this bug.