QVarLengthArray: use assign() for the iterator,iterator ctor
Let's avoid std::back_inserter for non-complex types, which generates a huge amount of unnecessary code. The implementation of assign() is far more modern. Pick-to: 6.10 Change-Id: Ia8b9c90336af2bebd49ffffd0d69ace761c6aa59 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
54069d37ef
commit
96dfe0373c
@ -360,8 +360,7 @@ public:
|
|||||||
inline QVarLengthArray(InputIterator first, InputIterator last)
|
inline QVarLengthArray(InputIterator first, InputIterator last)
|
||||||
: QVarLengthArray()
|
: QVarLengthArray()
|
||||||
{
|
{
|
||||||
QtPrivate::reserveIfForwardIterator(this, first, last);
|
assign(first, last);
|
||||||
std::copy(first, last, std::back_inserter(*this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline ~QVarLengthArray()
|
inline ~QVarLengthArray()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user