diff options
Diffstat (limited to 'protocols/MSN/src/msn_srv.cpp')
-rw-r--r-- | protocols/MSN/src/msn_srv.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/protocols/MSN/src/msn_srv.cpp b/protocols/MSN/src/msn_srv.cpp index 4d4a239c52..a3e5181f73 100644 --- a/protocols/MSN/src/msn_srv.cpp +++ b/protocols/MSN/src/msn_srv.cpp @@ -84,8 +84,7 @@ void CMsnProto::MSN_DeleteServerGroup(LPCSTR szId) void CMsnProto::MSN_FreeGroups(void)
{
- for (int i = 0; i < m_arGroups.getCount(); i++) {
- ServerGroupItem* p = m_arGroups[i];
+ for (auto &p : m_arGroups) {
mir_free(p->id);
mir_free(p->name);
mir_free(p);
@@ -107,11 +106,9 @@ LPCSTR CMsnProto::MSN_GetGroupById(const char* pId) LPCSTR CMsnProto::MSN_GetGroupByName(const char* pName)
{
- for (int i = 0; i < m_arGroups.getCount(); i++) {
- const ServerGroupItem* p = m_arGroups[i];
+ for (auto &p : m_arGroups)
if (mir_strcmp(p->name, pName) == 0)
return p->id;
- }
return nullptr;
}
|