summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-10-01 10:51:46 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-10-01 10:51:46 (GMT)
commit6e345232b3a88e51f45149b039e1a27230a0bc2a (patch)
tree87b9eafd0dec08da072804fbd8c73c382410fd39 /Swiften
parent3476833ca17c19dba0a31645d689f216039107dc (diff)
downloadswift-contrib-6e345232b3a88e51f45149b039e1a27230a0bc2a.zip
swift-contrib-6e345232b3a88e51f45149b039e1a27230a0bc2a.tar.bz2
Fixed cppcheck warnings.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Elements/JingleS5BTransportPayload.h2
-rw-r--r--Swiften/Queries/IQRouter.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/Elements/JingleS5BTransportPayload.h b/Swiften/Elements/JingleS5BTransportPayload.h
index 980af27..995933c 100644
--- a/Swiften/Elements/JingleS5BTransportPayload.h
+++ b/Swiften/Elements/JingleS5BTransportPayload.h
@@ -58,7 +58,7 @@ namespace Swift {
this->mode = mode;
}
- const std::vector<Candidate>& getCandidates() {
+ const std::vector<Candidate>& getCandidates() const {
return candidates;
}
diff --git a/Swiften/Queries/IQRouter.h b/Swiften/Queries/IQRouter.h
index 8dba334..de2822b 100644
--- a/Swiften/Queries/IQRouter.h
+++ b/Swiften/Queries/IQRouter.h
@@ -31,7 +31,7 @@ namespace Swift {
jid_ = jid;
}
- const JID& getJID() {
+ const JID& getJID() const {
return jid_;
}
diff --git a/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp
index 552f7f1..8758722 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp
@@ -24,7 +24,7 @@ MUCAdminPayloadSerializer::MUCAdminPayloadSerializer() : GenericPayloadSerialize
std::string MUCAdminPayloadSerializer::serializePayload(boost::shared_ptr<MUCAdminPayload> payload) const {
XMLElement mucElement("query", "http://jabber.org/protocol/muc#admin");
- foreach (const MUCItem item, payload->getItems()) {
+ foreach (const MUCItem& item, payload->getItems()) {
mucElement.addNode(MUCItemSerializer::itemToElement(item));
}
return mucElement.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.cpp
index 68662b1..96fba90 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.cpp
@@ -31,7 +31,7 @@ std::string MUCUserPayloadSerializer::serializePayload(boost::shared_ptr<MUCUser
statusElement->setAttribute("code", code.str());
mucElement.addNode(statusElement);
}
- foreach (const MUCItem item, payload->getItems()) {
+ foreach (const MUCItem& item, payload->getItems()) {
mucElement.addNode(MUCItemSerializer::itemToElement(item));
}
boost::shared_ptr<Payload> childPayload = payload->getPayload();