summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/cookies.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/IcqOscarJ/src/cookies.cpp')
-rw-r--r--protocols/IcqOscarJ/src/cookies.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/IcqOscarJ/src/cookies.cpp b/protocols/IcqOscarJ/src/cookies.cpp
index 51004e0915..de73d58e03 100644
--- a/protocols/IcqOscarJ/src/cookies.cpp
+++ b/protocols/IcqOscarJ/src/cookies.cpp
@@ -33,9 +33,9 @@ void CIcqProto::RemoveExpiredCookies()
{
time_t tNow = time(nullptr);
- for (int i = cookies.getCount() - 1; i >= 0; i--)
- if ((cookies[i].dwTime + COOKIE_TIMEOUT) < tNow)
- cookies.remove(i);
+ for (auto &it : cookies.rev_iter())
+ if (it->dwTime + COOKIE_TIMEOUT < tNow)
+ cookies.remove(it);
}
// Generate and allocate cookie