From a9a4e326891d0d62ef2d2cd8001ebee1e54d3fd6 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Fri, 30 Aug 2019 21:43:21 +0200 Subject: [PATCH] core: Remove copy assignment operator from CoreIdentity MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The operator is no longer needed due to the switch from QList to std::vector that was done in the previous commit. This avoids a warning in GCC 9: src/core/coreidentity.cpp: In member function ‘CoreIdentity& CoreIdentity::operator=(const CoreIdentity&)’: src/core/coreidentity.cpp:91:23: warning: implicitly-declared ‘Identity& Identity::operator=(const Identity&)’ is deprecated [-Wdeprecated-copy] The warning is caused by relying on the implicit copy assignment operator in the base class, which is no longer required by the standard since C++11, and may be removed in the future. --- src/core/coreidentity.cpp | 10 ---------- src/core/coreidentity.h | 2 -- 2 files changed, 12 deletions(-) diff --git a/src/core/coreidentity.cpp b/src/core/coreidentity.cpp index 4329a28b..5cdd3ca6 100644 --- a/src/core/coreidentity.cpp +++ b/src/core/coreidentity.cpp @@ -86,16 +86,6 @@ void CoreIdentity::setSslCert(const QByteArray& encoded) #endif -CoreIdentity& CoreIdentity::operator=(const CoreIdentity& identity) -{ - Identity::operator=(identity); -#ifdef HAVE_SSL - _sslKey = identity._sslKey; - _sslCert = identity._sslCert; -#endif - return *this; -} - #ifdef HAVE_SSL // ======================================== // CoreCertManager diff --git a/src/core/coreidentity.h b/src/core/coreidentity.h index a211a726..bb11ff51 100644 --- a/src/core/coreidentity.h +++ b/src/core/coreidentity.h @@ -81,8 +81,6 @@ public: void setSslCert(const QByteArray& encoded); #endif /* HAVE_SSL */ - CoreIdentity& operator=(const CoreIdentity& identity); - private: #ifdef HAVE_SSL QSslKey _sslKey; -- 2.20.1