diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-03-25 00:28:19 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-08-24 13:42:42 +0200 |
commit | e3e4fe79100162a9fc47b923fe23d1a296cd67d1 (patch) | |
tree | f362b582bb229d4d036d87b093f474b168ab3eb1 /examples/opengl | |
parent | b98381821900154276ce207799293a00a5f40f0e (diff) |
Use std::vector range ctor in QVector::toStdVector()
There are three reasons to do so:
1. This could be more efficient, depending on the STL implementation.
2. By using QTypedArrayData iterators (T*) instead of QVector ones,
we actually invoke the non-templated range ctor of std::vector,
at least in the common case that std::vector<T>::const_iterator
is also const T*.
3. The change turns a former NRVO return into a RVO one, potentially
allowing more compilers to perform the copy elision.
Change-Id: I70b35aaeae70ba06a971a36b8b1b1da997e8094f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'examples/opengl')
0 files changed, 0 insertions, 0 deletions