diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2019-08-29 15:24:52 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-08-30 11:09:36 +0200 |
commit | 0556366ddb3a59071256a5646c3c82e7da23d619 (patch) | |
tree | 1c8fd6214eb1e4fee044b6e5b0e6c9034ebdec37 /tests/benchmarks/dbus | |
parent | c78a716b723812e14563b2e1c96c050703dbc9c7 (diff) |
Deduplicate list-building code in QDateTime benchmark
Aside from the start-date and the end-date, and a variant with a
time-zone, the lists various tests were building were all built the
same way; so pack that up as a pair of functions (one without
time-zone, one with) to save duplication. Make the list in each
function const, ready for conversion of foreach loops to ranged for.
In the process, replace QList with QVector, reserve space before we
populate and use auto for the now-const list variables it's saved in.
Change-Id: I7d8cce459a4d6111cd645e8d3966ad769ab7e201
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'tests/benchmarks/dbus')
0 files changed, 0 insertions, 0 deletions