From 4c281b28075dfa69d8cc2301b06492fbddb62f24 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 30 Jan 2020 20:18:37 +0300 Subject: LIST::remove + LIST::indexOf() combination removed with LIST::removeItem --- protocols/Facebook/src/server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/Facebook') diff --git a/protocols/Facebook/src/server.cpp b/protocols/Facebook/src/server.cpp index 28ee2adb96..9b025c2376 100644 --- a/protocols/Facebook/src/server.cpp +++ b/protocols/Facebook/src/server.cpp @@ -576,8 +576,8 @@ void FacebookProto::OnPublishPrivateMessage(const JSONNode &root) if (m_uid == actorFbId) { for (auto& it : arOwnMessages) { if (it->msgId == offlineId) { - ProtoBroadcastAck(pUser->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE) it->reqId, (LPARAM) szId.c_str()); - arOwnMessages.remove(arOwnMessages.indexOf(&it)); + ProtoBroadcastAck(pUser->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)it->reqId, (LPARAM)szId.c_str()); + arOwnMessages.removeItem(&it); break; } } @@ -789,7 +789,7 @@ void FacebookProto::OnPublishSentMessage(const JSONNode &root) } else ProtoBroadcastAck(pUser->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)it->reqId, (LPARAM)szId.c_str()); - arOwnMessages.remove(arOwnMessages.indexOf(&it)); + arOwnMessages.removeItem(&it); break; } } -- cgit v1.2.3