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 /plugins/NewXstatusNotify/src | |
parent | a243c59835182e2a1fa91d9c7bd80defea88e4e8 (diff) |
LIST::remove + LIST::indexOf() combination removed with LIST::removeItem
Diffstat (limited to 'plugins/NewXstatusNotify/src')
-rw-r--r-- | plugins/NewXstatusNotify/src/xstatus.cpp | 18 |
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));
}
}
|