mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-23 18:24:59 +00:00
PEGASUS: Fix use of Common::List::erase
This commit is contained in:
parent
447b7204f3
commit
5be808fe20
@ -66,9 +66,12 @@ void Notification::notifyMe(NotificationReceiver *receiver, tNotificationFlags f
|
||||
}
|
||||
|
||||
void Notification::cancelNotification(NotificationReceiver *receiver) {
|
||||
for (tReceiverIterator it = _receivers.begin(); it != _receivers.end(); it++)
|
||||
for (tReceiverIterator it = _receivers.begin(); it != _receivers.end();) {
|
||||
if (it->receiver == receiver)
|
||||
_receivers.erase(it);
|
||||
it = _receivers.erase(it);
|
||||
else
|
||||
it++;
|
||||
}
|
||||
}
|
||||
|
||||
void Notification::setNotificationFlags(tNotificationFlags flags, tNotificationFlags mask) {
|
||||
@ -124,9 +127,12 @@ void NotificationManager::addNotification(Notification *notification) {
|
||||
}
|
||||
|
||||
void NotificationManager::removeNotification(Notification *notification) {
|
||||
for (tNotificationIterator it = _notifications.begin(); it != _notifications.end(); it++)
|
||||
for (tNotificationIterator it = _notifications.begin(); it != _notifications.end();) {
|
||||
if ((*it) == notification)
|
||||
_notifications.erase(it);
|
||||
it = _notifications.erase(it);
|
||||
else
|
||||
it++;
|
||||
}
|
||||
}
|
||||
|
||||
void NotificationManager::detachNotifications() {
|
||||
|
Loading…
Reference in New Issue
Block a user