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/gamestates/GSRoot.cc

    r10818 r10919  
    7474    {
    7575        unsigned int nr=0;
    76         for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it; ++it)
    77         {
    78             Synchronisable* synchronisable = orxonox_cast<Synchronisable*>(*it);
     76        for (BaseObject* baseObject : ObjectList<BaseObject>())
     77        {
     78            Synchronisable* synchronisable = orxonox_cast<Synchronisable*>(baseObject);
    7979            if (synchronisable)
    80                 orxout(debug_output) << "object: " << it->getIdentifier()->getName() << " id: " << synchronisable->getObjectID() << endl;
     80                orxout(debug_output) << "object: " << baseObject->getIdentifier()->getName() << " id: " << synchronisable->getObjectID() << endl;
    8181            else
    82                 orxout(debug_output) << "object: " << it->getIdentifier()->getName() << endl;
     82                orxout(debug_output) << "object: " << baseObject->getIdentifier()->getName() << endl;
    8383            nr++;
    8484        }
Note: See TracChangeset for help on using the changeset viewer.