summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_accounts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_accounts.cpp')
-rw-r--r--protocols/Tox/src/tox_accounts.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/Tox/src/tox_accounts.cpp b/protocols/Tox/src/tox_accounts.cpp
index 866a0dbd3b..ad948974a8 100644
--- a/protocols/Tox/src/tox_accounts.cpp
+++ b/protocols/Tox/src/tox_accounts.cpp
@@ -23,9 +23,10 @@ int CToxProto::UninitAccount(CToxProto *proto)
CToxProto* CToxProto::GetContactAccount(MCONTACT hContact)
{
- for (int i = 0; i < Accounts.getCount(); i++)
- if (mir_strcmpi(GetContactProto(hContact), Accounts[i]->m_szModuleName) == 0)
- return Accounts[i];
+ for (auto &it : Accounts)
+ if (mir_strcmpi(GetContactProto(hContact), it->m_szModuleName) == 0)
+ return it;
+
return nullptr;
}