diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2021-06-30 10:59:13 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2021-06-30 23:13:27 +0200 |
commit | 8c97f514253bf130a774822f397db4a7263d572a (patch) | |
tree | 1b1418ea0916c1ac861573585a0c43b433edab97 /tests/benchmarks/corelib/tools | |
parent | 7a01e4440494697a7f426c9b7412580fbea01add (diff) |
QList benchmark: fix annoying -Wdeprecated-copy warning
MyPrimitive has a copy ctor but lacked a copy assignment operator,
leading to above-mentioned warning.
Fix by supplying the missing special member function.
Change-Id: Icd0c3c12554eb838b5d880ec9a649d0b5cfc81b7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'tests/benchmarks/corelib/tools')
-rw-r--r-- | tests/benchmarks/corelib/tools/qlist/main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/benchmarks/corelib/tools/qlist/main.cpp b/tests/benchmarks/corelib/tools/qlist/main.cpp index 47e7d8a4a6..b65d02b750 100644 --- a/tests/benchmarks/corelib/tools/qlist/main.cpp +++ b/tests/benchmarks/corelib/tools/qlist/main.cpp @@ -103,6 +103,8 @@ struct MyPrimitive : public MyBase { ++errorCount; } MyPrimitive(const MyPrimitive &other) : MyBase(other) { ++errorCount; } + MyPrimitive &operator=(const MyPrimitive &other) + { ++errorCount; MyBase::operator=(other); return *this; } ~MyPrimitive() { ++errorCount; } }; |