From 49b94e16cdb788d12c0a2afa8c64860746133b50 Mon Sep 17 00:00:00 2001
From: Tobias Markmann <tm@ayena.de>
Date: Fri, 8 Apr 2016 07:53:25 +0200
Subject: Fix code in response to compiler warnings by clang

Test-Information:

Builds on OS X 10.11.4 with Apple clang and clang master.

Change-Id: I012577e29c6fcf2fb452b4f13912aaeb37250fb5

diff --git a/Swift/QtUI/QtWebKitChatView.cpp b/Swift/QtUI/QtWebKitChatView.cpp
index a40d0b3..46e8763 100644
--- a/Swift/QtUI/QtWebKitChatView.cpp
+++ b/Swift/QtUI/QtWebKitChatView.cpp
@@ -129,7 +129,7 @@ void QtWebKitChatView::addMessageBottom(std::shared_ptr<ChatSnippet> snippet) {
 
 void QtWebKitChatView::addMessageTop(std::shared_ptr<ChatSnippet> /* snippet */) {
     // TODO: Implement this in a sensible manner later.
-    assert(false);
+    SWIFT_LOG(error) << "Not yet implemented!" << std::endl;
 }
 
 void QtWebKitChatView::addToDOM(std::shared_ptr<ChatSnippet> snippet) {
@@ -468,7 +468,7 @@ int QtWebKitChatView::getSnippetPositionByDate(const QDate& date) {
 
 void QtWebKitChatView::resetTopInsertPoint() {
     // TODO: Implement or refactor later.
-    assert(false);
+    SWIFT_LOG(error) << "Not yet implemented!" << std::endl;
 }
 
 std::string QtWebKitChatView::addMessage(
diff --git a/Swiften/Base/Error.h b/Swiften/Base/Error.h
index d470b89..af4f27e 100644
--- a/Swiften/Base/Error.h
+++ b/Swiften/Base/Error.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
  * All rights reserved.
  * See the COPYING file for more information.
  */
@@ -13,6 +13,7 @@ namespace Swift {
         public:
             Error() {}
             SWIFTEN_DEFAULT_COPY_CONSTRUCTOR(Error)
+            SWIFTEN_DEFAULT_COPY_ASSIGMNENT_OPERATOR(Error)
             virtual ~Error();
     };
 }
diff --git a/Swiften/Elements/MUCOccupant.cpp b/Swiften/Elements/MUCOccupant.cpp
index edd6eb6..65fb8c2 100644
--- a/Swiften/Elements/MUCOccupant.cpp
+++ b/Swiften/Elements/MUCOccupant.cpp
@@ -1,11 +1,13 @@
 /*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
  * All rights reserved.
  * See the COPYING file for more information.
  */
 
 #include <Swiften/Elements/MUCOccupant.h>
 
+#include <utility>
+
 namespace Swift {
 
 MUCOccupant::MUCOccupant(const std::string &nick, Role role, Affiliation affiliation) : nick_(nick), role_(role), affiliation_(affiliation) {
@@ -18,6 +20,14 @@ MUCOccupant::MUCOccupant(const MUCOccupant& other) : nick_(other.getNick()), rol
 
 }
 
+MUCOccupant& MUCOccupant::operator=(MUCOccupant other) {
+    std::swap(nick_, other.nick_);
+    std::swap(role_, other.role_);
+    std::swap(affiliation_, other.affiliation_);
+    std::swap(realJID_, other.realJID_);
+    return *this;
+}
+
 std::string MUCOccupant::getNick() const {
     return nick_;
 }
diff --git a/Swiften/Elements/MUCOccupant.h b/Swiften/Elements/MUCOccupant.h
index eb7df2c..c345a49 100644
--- a/Swiften/Elements/MUCOccupant.h
+++ b/Swiften/Elements/MUCOccupant.h
@@ -25,6 +25,8 @@ namespace Swift {
             MUCOccupant(const MUCOccupant& other);
             ~MUCOccupant();
 
+            MUCOccupant& operator=(MUCOccupant other);
+
             std::string getNick() const;
             Role getRole() const;
             Affiliation getAffiliation() const;
diff --git a/Swiften/Network/DomainNameResolveError.h b/Swiften/Network/DomainNameResolveError.h
index f231f9a..7a5eed1 100644
--- a/Swiften/Network/DomainNameResolveError.h
+++ b/Swiften/Network/DomainNameResolveError.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
  * All rights reserved.
  * See the COPYING file for more information.
  */
@@ -13,5 +13,7 @@ namespace Swift {
     class SWIFTEN_API DomainNameResolveError : public Error {
         public:
             DomainNameResolveError() {}
+            SWIFTEN_DEFAULT_COPY_CONSTRUCTOR(DomainNameResolveError)
+            SWIFTEN_DEFAULT_COPY_ASSIGMNENT_OPERATOR(DomainNameResolveError)
     };
 }
-- 
cgit v0.10.2-6-g49f6