diff options
Diffstat (limited to 'protocols/Steam/src/steam_contacts.cpp')
-rw-r--r-- | protocols/Steam/src/steam_contacts.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index e3d3c8c9c7..9bdfdc8bf3 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -2,7 +2,7 @@ void CSteamProto::SetAllContactStatuses(int status) { - for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) + for (auto &hContact : acc_contact_iter()) SetContactStatus(hContact, status); } @@ -71,7 +71,7 @@ MCONTACT CSteamProto::GetContactFromAuthEvent(MEVENT hEvent) MCONTACT CSteamProto::GetContact(const char *steamId) { - for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) { + for (auto &hContact : acc_contact_iter()) { ptrA cSteamId(getStringA(hContact, "SteamID")); if (!mir_strcmp(cSteamId, steamId)) return hContact; @@ -428,7 +428,7 @@ void CSteamProto::OnGotFriendList(const JSONNode &root, void*) } // Check and update contacts in database - for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) { + for (auto &hContact : acc_contact_iter()) { ptrA steamId(getStringA(hContact, "SteamID")); if (steamId == nullptr) continue; |