QVarLengthArray: port internal users from at() to op[]

In preparation of splitting the class into QVLABase and
QVLAStorage.

Task-number: QTBUG-84785
Change-Id: Ic0da6c2e110a5b979b78989616b9a2cb0f27463b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Marc Mutz 2021-12-07 10:58:02 +01:00
parent 84fba93ebb
commit dbf836738a

View File

@ -572,12 +572,12 @@ Q_OUTOFLINE_TEMPLATE T QVarLengthArray<T, Prealloc>::value(qsizetype i) const
{
if (size_t(i) >= size_t(size()))
return T();
return at(i);
return operator[](i);
}
template <class T, qsizetype Prealloc>
Q_OUTOFLINE_TEMPLATE T QVarLengthArray<T, Prealloc>::value(qsizetype i, const T &defaultValue) const
{
return (size_t(i) >= size_t(size())) ? defaultValue : at(i);
return (size_t(i) >= size_t(size())) ? defaultValue : operator[](i);
}
template <class T, qsizetype Prealloc>