summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-08 05:53:25 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-08 05:53:25 (GMT)
commit49b94e16cdb788d12c0a2afa8c64860746133b50 (patch)
treea968c772b260a478bdea973de2e86dc1b5ad3b1a /Swiften/Elements/MUCOccupant.cpp
parent88a89e14df98764d86d3d1eaa13e111350ac9e55 (diff)
downloadswift-49b94e16cdb788d12c0a2afa8c64860746133b50.zip
swift-49b94e16cdb788d12c0a2afa8c64860746133b50.tar.bz2
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
Diffstat (limited to 'Swiften/Elements/MUCOccupant.cpp')
-rw-r--r--Swiften/Elements/MUCOccupant.cpp12
1 files changed, 11 insertions, 1 deletions
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_;
}