summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Elements/Stanza.cpp')
-rw-r--r--Swiften/Elements/Stanza.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/Elements/Stanza.cpp b/Swiften/Elements/Stanza.cpp
index 5d1229c..f5a1b58 100644
--- a/Swiften/Elements/Stanza.cpp
+++ b/Swiften/Elements/Stanza.cpp
@@ -58,9 +58,9 @@ boost::optional<boost::posix_time::ptime> Stanza::getTimestamp() const {
boost::optional<boost::posix_time::ptime> Stanza::getTimestampFrom(const JID& jid) const {
std::vector< std::shared_ptr<Delay> > delays = getPayloads<Delay>();
- for (size_t i = 0; i < delays.size(); ++i) {
- if (delays[i]->getFrom() == jid) {
- return delays[i]->getStamp();
+ for (auto& delay : delays) {
+ if (delay->getFrom() == jid) {
+ return delay->getStamp();
}
}
return getTimestamp();