summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Jingle')
-rw-r--r--Swiften/Jingle/Jingle.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/Jingle/Jingle.h b/Swiften/Jingle/Jingle.h
index 13c235b..0cd1a23 100644
--- a/Swiften/Jingle/Jingle.h
+++ b/Swiften/Jingle/Jingle.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 Isode Limited.
+ * Copyright (c) 2011-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -14,9 +14,9 @@ namespace Swift {
namespace Jingle {
template<typename T>
JingleContentPayload::ref getContentWithDescription(const std::vector<JingleContentPayload::ref>& contents) {
- for (size_t i = 0; i < contents.size(); ++i) {
- if (contents[i]->getDescription<T>()) {
- return contents[i];
+ for (const auto& content : contents) {
+ if (content->getDescription<T>()) {
+ return content;
}
}
return JingleContentPayload::ref();