summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commit477a6ea70d0bb1b1dfe9cbd9a15b6dad0284ddeb (patch)
tree247eed13a5231c3983e343f0b7fc2a95012353c2 /protocols/FacebookRM
parent9d0174ebe2bd005418855b18f737c36d5c20ab4a (diff)
all another C++'11 iterators
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r--protocols/FacebookRM/src/messages.cpp4
-rw-r--r--protocols/FacebookRM/src/stdafx.h4
-rw-r--r--protocols/FacebookRM/src/theme.cpp6
3 files changed, 7 insertions, 7 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index 263f33a462..b502a1f471 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -320,8 +320,8 @@ HttpRequest* facebook_client::markMessageReadRequest(const LIST<char> &ids)
p->Url << INT_PARAM("__a", 1);
- for (int i = 0; i < ids.getCount(); i++) {
- std::string id_ = ids[i];
+ for (auto &it : ids) {
+ std::string id_ = it;
// NOTE: Remove "id." prefix as here we need to give threadFbId and not threadId
if (id_.substr(0, 3) == "id.")
id_ = id_.substr(3);
diff --git a/protocols/FacebookRM/src/stdafx.h b/protocols/FacebookRM/src/stdafx.h
index 83efa47cf7..ea411d908f 100644
--- a/protocols/FacebookRM/src/stdafx.h
+++ b/protocols/FacebookRM/src/stdafx.h
@@ -86,6 +86,6 @@ extern DWORD g_mirandaVersion;
template <typename T>
__inline static void FreeList(const LIST<T> &lst)
{
- for (int i = 0; i < lst.getCount(); i++)
- mir_free(lst[i]);
+ for (auto &it : lst)
+ mir_free(it);
} \ No newline at end of file
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp
index 70c0835308..91d7931076 100644
--- a/protocols/FacebookRM/src/theme.cpp
+++ b/protocols/FacebookRM/src/theme.cpp
@@ -75,9 +75,9 @@ static FacebookProto * GetInstanceByHContact(MCONTACT hContact)
if (!proto)
return nullptr;
- for (int i = 0; i < g_Instances.getCount(); i++)
- if (!mir_strcmp(proto, g_Instances[i].m_szModuleName))
- return &g_Instances[i];
+ for (auto &it : g_Instances)
+ if (!mir_strcmp(proto, it->m_szModuleName))
+ return it;
return nullptr;
}