diff options
Diffstat (limited to 'Swiften/Elements')
-rw-r--r-- | Swiften/Elements/DiscoInfo.h | 2 | ||||
-rw-r--r-- | Swiften/Elements/FormField.h | 2 | ||||
-rw-r--r-- | Swiften/Elements/JinglePayload.h | 2 | ||||
-rw-r--r-- | Swiften/Elements/MUCUserPayload.h | 4 | ||||
-rw-r--r-- | Swiften/Elements/SearchPayload.h | 2 |
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 @@ -84,19 +84,19 @@ namespace Swift { bool hasFeature(const std::string& feature) const { return std::find(features_.begin(), features_.end(), feature) != features_.end(); } void addExtension(Form::ref form) { extensions_.push_back(form); } - const std::vector<Form::ref> getExtensions() const { + const std::vector<Form::ref>& getExtensions() const { return extensions_; } private: std::string node_; std::vector<Identity> identities_; std::vector<std::string> features_; std::vector<Form::ref> 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 @@ -42,19 +42,19 @@ namespace Swift { void addOption(const Option& option) { options.push_back(option); } const std::vector<Option>& getOptions() const { return options; } - const std::vector<std::string> getRawValues() const { + const std::vector<std::string>& getRawValues() const { return rawValues; } void addRawValue(const std::string& value) { rawValues.push_back(value); } protected: FormField() : required(false) {} 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 @@ -96,19 +96,19 @@ namespace Swift { const std::string& getSessionID() const { return sessionID; } void addContent(JingleContent::ref content) { this->contents.push_back(content); } - const std::vector<JingleContent::ref> getContents() const { + const std::vector<JingleContent::ref>& getContents() const { return contents; } void setReason(const Reason& reason) { this->reason = reason; } const boost::optional<Reason>& getReason() const { return reason; 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 @@ -46,18 +46,18 @@ namespace Swift { // } MUCUserPayload() { } void addItem(Item item) {items_.push_back(item);} 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_; std::vector<StatusCode> statusCodes_; }; } 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 @@ -68,19 +68,19 @@ namespace Swift { void setLast(const std::string& v) { this->last = v; } void setEMail(const std::string& v) { this->email = v; } - const std::vector<Item> getItems() const { + const std::vector<Item>& getItems() const { return items; } void addItem(const Item& item) { items.push_back(item); } private: Form::ref form; |