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/gametypes/Gametype.cc

    r10919 r10920  
    492492    {
    493493        unsigned int i = 0;
    494         for (ObjectList<Bot>::iterator it = ObjectList<Bot>::begin(); (it != ObjectList<Bot>::end()) && ((amount == 0) || (i < amount)); )
     494        ObjectList<Bot> list;
     495        for (ObjectList<Bot>::iterator it = list.begin(); (it != list.end()) && ((amount == 0) || (i < amount)); )
    495496        {
    496497            if (it->getGametype() == this)
Note: See TracChangeset for help on using the changeset viewer.