diff options
author | George Hazan <ghazan@miranda.im> | 2020-01-30 20:18:37 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-01-30 20:18:46 +0300 |
commit | 4c281b28075dfa69d8cc2301b06492fbddb62f24 (patch) | |
tree | b788f37caaff5063fd36eecad191d2a5582be12c /protocols/Discord | |
parent | a243c59835182e2a1fa91d9c7bd80defea88e4e8 (diff) |
LIST::remove + LIST::indexOf() combination removed with LIST::removeItem
Diffstat (limited to 'protocols/Discord')
-rw-r--r-- | protocols/Discord/src/dispatch.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp index 43f569f7a3..10fe201ba1 100644 --- a/protocols/Discord/src/dispatch.cpp +++ b/protocols/Discord/src/dispatch.cpp @@ -120,7 +120,7 @@ void CDiscordProto::OnCommandCallDeleted(const JSONNode &pRoot) for (auto &call : arVoiceCalls.rev_iter()) if (call->channelId == channelId) { elapsed = currTime - call->startTime; - arVoiceCalls.remove(arVoiceCalls.indexOf(&call)); + arVoiceCalls.removeItem(&call); break; } @@ -257,11 +257,10 @@ void CDiscordProto::OnCommandGuildDeleted(const JSONNode &pRoot) if (pGuild == nullptr) return; - auto T = arUsers.rev_iter(); - for (auto &it : T) + for (auto &it : arUsers.rev_iter()) if (it->pGuild == pGuild) { Chat_Terminate(m_szModuleName, it->wszUsername, true); - arUsers.remove(T.indexOf(&it)); + arUsers.removeItem(&it); } Chat_Terminate(m_szModuleName, pRoot["name"].as_mstring(), true); |