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>
This commit is contained in:
Marc Mutz 2021-06-30 10:59:13 +02:00
parent 7a01e44404
commit 8c97f51425

View File

@ -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; }
};