core: Remove copy assignment operator from CoreIdentity
authorManuel Nickschas <sputnick@quassel-irc.org>
Fri, 30 Aug 2019 19:43:21 +0000 (21:43 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 30 Aug 2019 22:34:29 +0000 (00:34 +0200)
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
src/core/coreidentity.h

index 4329a28..5cdd3ca 100644 (file)
@@ -86,16 +86,6 @@ void CoreIdentity::setSslCert(const QByteArray& encoded)
 
 #endif
 
 
 #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
 #ifdef HAVE_SSL
 // ========================================
 //  CoreCertManager
index a211a72..bb11ff5 100644 (file)
@@ -81,8 +81,6 @@ public:
     void setSslCert(const QByteArray& encoded);
 #endif /* HAVE_SSL */
 
     void setSslCert(const QByteArray& encoded);
 #endif /* HAVE_SSL */
 
-    CoreIdentity& operator=(const CoreIdentity& identity);
-
 private:
 #ifdef HAVE_SSL
     QSslKey _sslKey;
 private:
 #ifdef HAVE_SSL
     QSslKey _sslKey;