From: Manuel Nickschas Date: Fri, 30 Aug 2019 19:43:21 +0000 (+0200) Subject: core: Remove copy assignment operator from CoreIdentity X-Git-Tag: test-travis-01~26 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=a9a4e326891d0d62ef2d2cd8001ebee1e54d3fd6;hp=6e3574a163f07c28d44276318f2d9f92e169f491 core: Remove copy assignment operator from CoreIdentity 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. --- 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;