Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/gamestates/GSRoot.cc

    r10624 r11071  
    3434#include "core/GameMode.h"
    3535#include "core/command/ConsoleCommandIncludes.h"
     36#include "core/object/ObjectList.h"
    3637#include "network/NetworkFunctionIncludes.h"
    3738#include "tools/Timer.h"
     
    7374    {
    7475        unsigned int nr=0;
    75         for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it; ++it)
    76         {
    77             Synchronisable* synchronisable = orxonox_cast<Synchronisable*>(*it);
     76        for (BaseObject* baseObject : ObjectList<BaseObject>())
     77        {
     78            Synchronisable* synchronisable = orxonox_cast<Synchronisable*>(baseObject);
    7879            if (synchronisable)
    79                 orxout(debug_output) << "object: " << it->getIdentifier()->getName() << " id: " << synchronisable->getObjectID() << endl;
     80                orxout(debug_output) << "object: " << baseObject->getIdentifier()->getName() << " id: " << synchronisable->getObjectID() << endl;
    8081            else
    81                 orxout(debug_output) << "object: " << it->getIdentifier()->getName() << endl;
     82                orxout(debug_output) << "object: " << baseObject->getIdentifier()->getName() << endl;
    8283            nr++;
    8384        }
     
    9899    void GSRoot::deactivate()
    99100    {
    100         ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(0);
    101         ModifyConsoleCommand(__CC_getTimeFactor_name).setObject(0);
    102         ModifyConsoleCommand(__CC_setPause_name).setObject(0);
    103         ModifyConsoleCommand(__CC_pause_name).setObject(0);
     101        ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(nullptr);
     102        ModifyConsoleCommand(__CC_getTimeFactor_name).setObject(nullptr);
     103        ModifyConsoleCommand(__CC_setPause_name).setObject(nullptr);
     104        ModifyConsoleCommand(__CC_pause_name).setObject(nullptr);
    104105    }
    105106
     
    112113        }
    113114
    114         for (ObjectList<Timer>::iterator it = ObjectList<Timer>::begin(); it; )
     115        ObjectList<Timer> listTimer;
     116        for (ObjectList<Timer>::iterator it = listTimer.begin(); it; )
    115117        {
    116118            Timer* object = *it;
     
    128130        }
    129131        float realdt = leveldt * TimeFactorListener::getTimeFactor();
    130         for (ObjectList<Tickable>::iterator it = ObjectList<Tickable>::begin(); it; )
     132        ObjectList<Tickable> listTickable;
     133        for (ObjectList<Tickable>::iterator it = listTickable.begin(); it; )
    131134        {
    132135            Tickable* object = *it;
Note: See TracChangeset for help on using the changeset viewer.