From 8c97f514253bf130a774822f397db4a7263d572a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 30 Jun 2021 10:59:13 +0200 Subject: 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 --- tests/benchmarks/corelib/tools/qlist/main.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/benchmarks/corelib/tools') 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; } }; -- cgit v1.2.3