Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 6, 2015, 2:51:14 PM (8 years ago)
Author:
landauf
Message:

no static functions anymore in ObjectList. you need to instantiate an ObjectList to use it.
this allows for prettier for-loop syntax when iterating over an ObjectList of a specific context: for (T* object : ObjectList<T>(context)) { … }

File:
1 edited

Legend:

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

    r10919 r10920  
    138138    void Radar::cycleFocus()
    139139    {
    140         if (ObjectList<RadarViewable>::begin() == ObjectList<RadarViewable>::end())
     140        ObjectList<RadarViewable> listRadarViewable;
     141        if (listRadarViewable.size() == 0)
    141142        {
    142143            // list is empty
     
    158159            ObjectList<RadarViewable>::iterator itFallback = nullptr;
    159160
    160             for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it)
     161            for (ObjectList<RadarViewable>::iterator it = listRadarViewable.begin(); it; ++it)
    161162            {
    162163                if (*it == static_cast<RadarViewable*>(HumanController::getLocalControllerEntityAsPawn()))
Note: See TracChangeset for help on using the changeset viewer.