Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 5, 2015, 10:47:51 PM (8 years ago)
Author:
landauf
Message:

use range-based for-loop where it makes sense (e.g. ObjectList)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/interfaces/NotificationListener.cc

    r10624 r10919  
    108108    {
    109109        // Iterate through all NotificationListeners and notify them by calling the method they overloaded.
    110         for(ObjectList<NotificationListener>::iterator it = ObjectList<NotificationListener>::begin(); it != ObjectList<NotificationListener>::end(); ++it)
     110        for(NotificationListener* listener : ObjectList<NotificationListener>())
    111111        {
    112112            // If the notification is a message.
    113113            if(!isCommand)
    114                 it->registerNotification(message, sender, notificationMessageType::Value(messageType));
     114                listener->registerNotification(message, sender, notificationMessageType::Value(messageType));
    115115
    116116            // If the notification is a command.
     
    119119                notificationCommand::Value command = str2Command(message);
    120120                if(command != notificationCommand::none)
    121                     it->executeCommand(command, sender);
     121                    listener->executeCommand(command, sender);
    122122            }
    123123        }
Note: See TracChangeset for help on using the changeset viewer.