summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-05-23 18:57:05 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-05-23 18:57:05 (GMT)
commit3f72e2c3b7ce5a83287dc136c68b7ef6d2cc66bd (patch)
tree8afd8cdb41d3b35d2cf43afda5b9825ce75d8e72 /Swiften/Elements
parentd917be7e1f7e4c99c2d8d20cc3e54d7b6e61f333 (diff)
downloadswift-3f72e2c3b7ce5a83287dc136c68b7ef6d2cc66bd.zip
swift-3f72e2c3b7ce5a83287dc136c68b7ef6d2cc66bd.tar.bz2
Fixed const references to vectors.
This could potentially cause crashes (same as a previous patch).
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/DiscoInfo.h2
-rw-r--r--Swiften/Elements/FormField.h2
-rw-r--r--Swiften/Elements/JinglePayload.h2
-rw-r--r--Swiften/Elements/MUCUserPayload.h4
-rw-r--r--Swiften/Elements/SearchPayload.h2
5 files changed, 6 insertions, 6 deletions
diff --git a/Swiften/Elements/DiscoInfo.h b/Swiften/Elements/DiscoInfo.h
index d5bf64a..b73165e 100644
--- a/Swiften/Elements/DiscoInfo.h
+++ b/Swiften/Elements/DiscoInfo.h
@@ -90,7 +90,7 @@ namespace Swift {
extensions_.push_back(form);
}
- const std::vector<Form::ref> getExtensions() const {
+ const std::vector<Form::ref>& getExtensions() const {
return extensions_;
}
diff --git a/Swiften/Elements/FormField.h b/Swiften/Elements/FormField.h
index f455303..517369b 100644
--- a/Swiften/Elements/FormField.h
+++ b/Swiften/Elements/FormField.h
@@ -48,7 +48,7 @@ namespace Swift {
return options;
}
- const std::vector<std::string> getRawValues() const {
+ const std::vector<std::string>& getRawValues() const {
return rawValues;
}
diff --git a/Swiften/Elements/JinglePayload.h b/Swiften/Elements/JinglePayload.h
index 59d3c99..59fba7b 100644
--- a/Swiften/Elements/JinglePayload.h
+++ b/Swiften/Elements/JinglePayload.h
@@ -102,7 +102,7 @@ namespace Swift {
this->contents.push_back(content);
}
- const std::vector<JingleContent::ref> getContents() const {
+ const std::vector<JingleContent::ref>& getContents() const {
return contents;
}
diff --git a/Swiften/Elements/MUCUserPayload.h b/Swiften/Elements/MUCUserPayload.h
index fb6d4c4..7460c35 100644
--- a/Swiften/Elements/MUCUserPayload.h
+++ b/Swiften/Elements/MUCUserPayload.h
@@ -52,9 +52,9 @@ namespace Swift {
void addStatusCode(StatusCode code) {statusCodes_.push_back(code);}
- const std::vector<Item> getItems() const {return items_;}
+ const std::vector<Item>& getItems() const {return items_;}
- const std::vector<StatusCode> getStatusCodes() const {return statusCodes_;}
+ const std::vector<StatusCode>& getStatusCodes() const {return statusCodes_;}
private:
std::vector<Item> items_;
diff --git a/Swiften/Elements/SearchPayload.h b/Swiften/Elements/SearchPayload.h
index 3a484cc..d6d7ed1 100644
--- a/Swiften/Elements/SearchPayload.h
+++ b/Swiften/Elements/SearchPayload.h
@@ -74,7 +74,7 @@ namespace Swift {
this->email = v;
}
- const std::vector<Item> getItems() const {
+ const std::vector<Item>& getItems() const {
return items;
}