summaryrefslogtreecommitdiff
path: root/plugins/NewXstatusNotify
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-01-30 20:18:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-01-30 20:18:46 +0300
commit4c281b28075dfa69d8cc2301b06492fbddb62f24 (patch)
treeb788f37caaff5063fd36eecad191d2a5582be12c /plugins/NewXstatusNotify
parenta243c59835182e2a1fa91d9c7bd80defea88e4e8 (diff)
LIST::remove + LIST::indexOf() combination removed with LIST::removeItem
Diffstat (limited to 'plugins/NewXstatusNotify')
-rw-r--r--plugins/NewXstatusNotify/src/xstatus.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp
index 5796e051e3..b703204fd5 100644
--- a/plugins/NewXstatusNotify/src/xstatus.cpp
+++ b/plugins/NewXstatusNotify/src/xstatus.cpp
@@ -42,34 +42,28 @@ void FreeXSC(XSTATUSCHANGE *xsc)
void RemoveLoggedEventsXStatus(MCONTACT hContact)
{
- auto T = eventListXStatus.rev_iter();
- for (auto &it : T)
+ for (auto &it : eventListXStatus.rev_iter())
if (it->hContact == hContact) {
db_event_delete(it->hDBEvent);
- mir_free(it);
- eventListXStatus.remove(T.indexOf(&it));
+ mir_free(eventListXStatus.removeItem(&it));
}
}
void RemoveLoggedEventsStatus(MCONTACT hContact)
{
- auto T = eventListStatus.rev_iter();
- for (auto &it : T)
+ for (auto &it : eventListStatus.rev_iter())
if (it->hContact == hContact) {
db_event_delete(it->hDBEvent);
- mir_free(it);
- eventListStatus.remove(T.indexOf(&it));
+ mir_free(eventListStatus.removeItem(&it));
}
}
void RemoveLoggedEventsSMsg(MCONTACT hContact)
{
- auto T = eventListSMsg.rev_iter();
- for (auto &it : T)
+ for (auto &it : eventListSMsg.rev_iter())
if (it->hContact == hContact) {
db_event_delete(it->hDBEvent);
- mir_free(it);
- eventListSMsg.remove(T.indexOf(&it));
+ mir_free(eventListSMsg.removeItem(&it));
}
}