diff options
author | Marc Mutz <marc.mutz@qt.io> | 2021-11-26 13:00:37 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2021-11-26 19:51:12 +0000 |
commit | fd1a42490dc14e5cf4fbbd2682722305ce7a27ed (patch) | |
tree | a2b226a0ffbee53c335347f525d985c7ac2313a1 /src/corelib/tools/qvarlengtharray.h | |
parent | fac5b084a90e96af96283c8d13aa053bce2b809f (diff) |
QVarLengthArray: fix insert() type/alias mismatch between decl and impl
The declaration of insert(it, n, t) used qsizetype for n, while the
definition used size_type. That works by chance, because the size_type
typedef comes only after the insert(it, n, t) declaration. It was
detected when size_type became a typedef in a base class of
QVarLengthArray in my local branch.
Just use the same type name in the implementation as in the
declaration.
In 5.15, the same issue exists (with s/qsizetype/int/).
Pick-to: 6.2 5.15
Change-Id: I64235eeaeaed3d43f4c070ca536474fae94c1b5d
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/tools/qvarlengtharray.h')
-rw-r--r-- | src/corelib/tools/qvarlengtharray.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h index 4d2e80548d..4bff61b9b6 100644 --- a/src/corelib/tools/qvarlengtharray.h +++ b/src/corelib/tools/qvarlengtharray.h @@ -648,7 +648,7 @@ Q_OUTOFLINE_TEMPLATE auto QVarLengthArray<T, Prealloc>::emplace(const_iterator b } template <class T, qsizetype Prealloc> -Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::insert(const_iterator before, size_type n, const T &t) +Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::insert(const_iterator before, qsizetype n, const T &t) { Q_ASSERT_X(isValidIterator(before), "QVarLengthArray::insert", "The specified const_iterator argument 'before' is invalid"); |