Changeset 10919 for code/branches/cpp11_v2/src/orxonox/gamestates
- Timestamp:
- Dec 5, 2015, 10:47:51 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/orxonox/gamestates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc
r10916 r10919 164 164 // Note: Temporarily moved to GSRoot. 165 165 //// Call the scene objects 166 //for ( ObjectList<Tickable>::iterator it = ObjectList<Tickable>::begin(); it; ++it)167 // it->tick(time.getDeltaTime() * this->timeFactor_);166 //for (Tickable* tickable : ObjectList<Tickable>()) 167 // tickable->tick(time.getDeltaTime() * this->timeFactor_); 168 168 } 169 169 170 170 void GSLevel::prepareObjectTracking() 171 171 { 172 for ( ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)173 this->staticObjects_.insert( *it);172 for (BaseObject* baseObject : ObjectList<BaseObject>()) 173 this->staticObjects_.insert(baseObject); 174 174 } 175 175 … … 178 178 orxout(internal_info) << "Remaining objects:" << endl; 179 179 unsigned int i = 0; 180 for ( ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)181 { 182 std::set<BaseObject*>::const_iterator find = this->staticObjects_.find( *it);180 for (BaseObject* baseObject : ObjectList<BaseObject>()) 181 { 182 std::set<BaseObject*>::const_iterator find = this->staticObjects_.find(baseObject); 183 183 if (find == this->staticObjects_.end()) 184 184 { 185 orxout(internal_warning) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << "), references: " << it->getReferenceCount() << endl;185 orxout(internal_warning) << ++i << ": " << baseObject->getIdentifier()->getName() << " (" << baseObject << "), references: " << baseObject->getReferenceCount() << endl; 186 186 } 187 187 } … … 235 235 // export all states 236 236 std::vector<GSLevelMementoState*> states; 237 for ( ObjectList<GSLevelMemento>::iterator it = ObjectList<GSLevelMemento>::begin(); it != ObjectList<GSLevelMemento>::end(); ++it)238 { 239 GSLevelMementoState* state = it->exportMementoState();237 for (GSLevelMemento* memento : ObjectList<GSLevelMemento>()) 238 { 239 GSLevelMementoState* state = memento->exportMementoState(); 240 240 if (state) 241 241 states.push_back(state); … … 247 247 248 248 // import all states 249 for ( ObjectList<GSLevelMemento>::iterator it = ObjectList<GSLevelMemento>::begin(); it != ObjectList<GSLevelMemento>::end(); ++it)250 it->importMementoState(states);249 for (GSLevelMemento* memento : ObjectList<GSLevelMemento>()) 250 memento->importMementoState(states); 251 251 252 252 // delete states -
code/branches/cpp11_v2/src/orxonox/gamestates/GSRoot.cc
r10818 r10919 74 74 { 75 75 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); 79 79 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; 81 81 else 82 orxout(debug_output) << "object: " << it->getIdentifier()->getName() << endl;82 orxout(debug_output) << "object: " << baseObject->getIdentifier()->getName() << endl; 83 83 nr++; 84 84 }
Note: See TracChangeset
for help on using the changeset viewer.