diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-02-11 16:24:50 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-02-11 21:05:53 +0100 |
commit | 784276cc726daeccbe628c2483c0a470493877bc (patch) | |
tree | d62b241a9dfc24d5d58cc90c0b833d77aee5bd4e /tests/benchmarks/corelib/tools | |
parent | 92b15beb9aa09467583230a018c23114bb666a8e (diff) |
Fix compiler warning: initialize variable
The initialization happens outside the bechmarking loop.
Change-Id: Id661fa2f995e964277a5c388b8fac13ff8687d92
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/benchmarks/corelib/tools')
-rw-r--r-- | tests/benchmarks/corelib/tools/containers-sequential/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp index 6874c69abc..98716e83a9 100644 --- a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp +++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp @@ -58,7 +58,7 @@ class UseCases_QList : public UseCases<T> void insert(int size) { QList<T> v; - T t; + T t{}; QBENCHMARK { for (int i = 0; i < size; ++i) v.append(t); @@ -69,7 +69,7 @@ class UseCases_QList : public UseCases<T> { QList<T> v; - T t; + T t{}; for (int i = 0; i < size; ++i) v.append(t); |