Index: code/branches/cpp11_v2/src/libraries/core/BaseObject.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/BaseObject.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/BaseObject.cc	(revision 10919)
@@ -163,6 +163,6 @@
         this->setName(name);
 
-        for (ObjectList<XMLNameListener>::iterator it = ObjectList<XMLNameListener>::begin(); it != ObjectList<XMLNameListener>::end(); ++it)
-            it->loadedNewXMLName(this);
+        for (XMLNameListener* listener : ObjectList<XMLNameListener>())
+            listener->loadedNewXMLName(this);
     }
 
Index: code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.cc	(revision 10919)
@@ -915,8 +915,8 @@
 
             // Iterate through all subnodes
-            for (std::list<ClassTreeMaskNode*>::iterator it1 = node->subnodes_.begin(); it1 != node->subnodes_.end(); ++it1)
+            for (ClassTreeMaskNode* subnode : node->subnodes_)
             {
                 // Recursive call to this function with the subnode
-                this->create(*it1);
+                this->create(subnode);
 
                 // Only execute the following code if the current node is included, meaning some of the subnodes might be included too
@@ -926,22 +926,22 @@
 
                     // Iterate through all direct children
-                    for (std::set<const Identifier*>::iterator it2 = directChildren.begin(); it2 != directChildren.end(); ++it2)
+                    for (std::set<const Identifier*>::iterator it = directChildren.begin(); it != directChildren.end(); ++it)
                     {
                         // Check if the subnode (it1) is a child of the directChild (it2)
-                        if ((*it1)->getClass()->isA(*it2))
+                        if (subnode->getClass()->isA(*it))
                         {
                             // Yes it is - remove the directChild (it2) from the list, because it will already be handled by a recursive call to the create() function
-                            directChildren.erase(it2);
+                            directChildren.erase(it);
 
                             // Check if the removed directChild was exactly the subnode
-                            if (!(*it1)->getClass()->isExactlyA(*it2))
+                            if (!subnode->getClass()->isExactlyA(*it))
                             {
                                 // No, it wasn't exactly the subnode - therefore there are some classes between
 
                                 // Add the previously removed directChild (it2) to the subclass-list
-                                this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(*it2, true));
+                                this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(*it, true));
 
                                 // Insert all directChildren of the directChild
-                                directChildren.insert((*it2)->getDirectChildren().begin(), (*it2)->getDirectChildren().end());
+                                directChildren.insert((*it)->getDirectChildren().begin(), (*it)->getDirectChildren().end());
 
                                 // Restart the scan with the expanded set of directChildren
Index: code/branches/cpp11_v2/src/libraries/core/Core.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/Core.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/Core.cc	(revision 10919)
@@ -460,6 +460,6 @@
     {
         // Update UpdateListeners before general ticking
-        for (ObjectList<UpdateListener>::iterator it = ObjectList<UpdateListener>::begin(); it != ObjectList<UpdateListener>::end(); ++it)
-            it->preUpdate(time);
+        for (UpdateListener* listener : ObjectList<UpdateListener>())
+            listener->preUpdate(time);
         if (this->bGraphicsLoaded_)
         {
@@ -479,6 +479,6 @@
     {
         // Update UpdateListeners just before rendering
-        for (ObjectList<UpdateListener>::iterator it = ObjectList<UpdateListener>::begin(); it != ObjectList<UpdateListener>::end(); ++it)
-            it->postUpdate(time);
+        for (UpdateListener* listener : ObjectList<UpdateListener>())
+            listener->postUpdate(time);
         if (this->bGraphicsLoaded_)
         {
Index: code/branches/cpp11_v2/src/libraries/core/CoreConfig.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/CoreConfig.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/CoreConfig.cc	(revision 10919)
@@ -108,7 +108,6 @@
     {
         // Inform listeners
-        ObjectList<DevModeListener>::iterator it = ObjectList<DevModeListener>::begin();
-        for (; it != ObjectList<DevModeListener>::end(); ++it)
-            it->devModeChanged(bDevMode_);
+        for (DevModeListener* listener : ObjectList<DevModeListener>())
+            listener->devModeChanged(bDevMode_);
     }
 
Index: code/branches/cpp11_v2/src/libraries/core/CoreStaticInitializationHandler.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/CoreStaticInitializationHandler.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/CoreStaticInitializationHandler.cc	(revision 10919)
@@ -129,6 +129,6 @@
             {
                 // iterate over all contexts
-                for (ObjectList<Context>::iterator it_context = ObjectList<Context>::begin(); it_context != ObjectList<Context>::end(); ++it_context)
-                    it_context->destroyObjectList(identifier);
+                for (Context* context : ObjectList<Context>())
+                    context->destroyObjectList(identifier);
             }
         }
Index: code/branches/cpp11_v2/src/libraries/core/Game.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/Game.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/Game.cc	(revision 10919)
@@ -115,9 +115,8 @@
 
         // After the core has been created, we can safely instantiate the GameStates that don't require graphics
-        for (std::map<std::string, GameStateInfo>::const_iterator it = gameStateDeclarations_s.begin();
-            it != gameStateDeclarations_s.end(); ++it)
-        {
-            if (!it->second.bGraphicsMode)
-                constructedStates_[it->second.stateName] = GameStateFactory::fabricate(it->second);
+        for (const auto& mapEntry : gameStateDeclarations_s)
+        {
+            if (!mapEntry.second.bGraphicsMode)
+                constructedStates_[mapEntry.second.stateName] = GameStateFactory::fabricate(mapEntry.second);
         }
 
@@ -262,6 +261,5 @@
     {
         // Note: The first element is the empty root state, which doesn't need ticking
-        for (GameStateVector::const_iterator it = this->loadedStates_.begin() + 1;
-            it != this->loadedStates_.end(); ++it)
+        for (const std::shared_ptr<GameState>& state : this->loadedStates_)
         {
             try
@@ -269,17 +267,17 @@
                 // Add tick time for most of the states
                 uint64_t timeBeforeTick = 0;
-                if ((*it)->getInfo().bIgnoreTickTime)
+                if (state->getInfo().bIgnoreTickTime)
                     timeBeforeTick = this->gameClock_->getRealMicroseconds();
-                (*it)->update(*this->gameClock_);
-                if ((*it)->getInfo().bIgnoreTickTime)
+                state->update(*this->gameClock_);
+                if (state->getInfo().bIgnoreTickTime)
                     this->subtractTickTime(static_cast<int32_t>(this->gameClock_->getRealMicroseconds() - timeBeforeTick));
             }
             catch (...)
             {
-                orxout(user_error) << "An exception occurred while updating '" << (*it)->getName() << "': " << Exception::handleMessage() << endl;
+                orxout(user_error) << "An exception occurred while updating '" << state->getName() << "': " << Exception::handleMessage() << endl;
                 orxout(user_error) << "This should really never happen!" << endl;
                 orxout(user_error) << "Unloading all GameStates depending on the one that crashed." << endl;
                 std::shared_ptr<GameStateTreeNode> current = this->loadedTopStateNode_;
-                while (current->name_ != (*it)->getName() && current)
+                while (current->name_ != state->getName() && current)
                     current = current->parent_.lock();
                 if (current && current->parent_.lock())
@@ -520,13 +518,12 @@
 
             // Construct all the GameStates that require graphics
-            for (std::map<std::string, GameStateInfo>::const_iterator it = gameStateDeclarations_s.begin();
-                it != gameStateDeclarations_s.end(); ++it)
-            {
-                if (it->second.bGraphicsMode)
+            for (const auto& mapEntry : gameStateDeclarations_s)
+            {
+                if (mapEntry.second.bGraphicsMode)
                 {
                     // Game state loading failure is serious --> don't catch
-                    std::shared_ptr<GameState> gameState = GameStateFactory::fabricate(it->second);
+                    std::shared_ptr<GameState> gameState = GameStateFactory::fabricate(mapEntry.second);
                     if (!constructedStates_.insert(std::make_pair(
-                        it->second.stateName, gameState)).second)
+                        mapEntry.second.stateName, gameState)).second)
                         assert(false); // GameState was already created!
                 }
Index: code/branches/cpp11_v2/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/GraphicsManager.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/GraphicsManager.cc	(revision 10919)
@@ -389,6 +389,6 @@
         GUIManager::getInstance().setCamera(camera);
 
-        for (ObjectList<ViewportEventListener>::iterator it = ObjectList<ViewportEventListener>::begin(); it != ObjectList<ViewportEventListener>::end(); ++it)
-            it->cameraChanged(this->viewport_, oldCamera);
+        for (ViewportEventListener* listener : ObjectList<ViewportEventListener>())
+            listener->cameraChanged(this->viewport_, oldCamera);
     }
 
Index: code/branches/cpp11_v2/src/libraries/core/NamespaceNode.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/NamespaceNode.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/NamespaceNode.cc	(revision 10919)
@@ -149,10 +149,11 @@
 
             int i = 0;
-            for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); i++, ++it)
+            for (const auto& mapEntry : this->subnodes_)
             {
                 if (i > 0)
                     output += ", ";
 
-                output += it->second->toString();
+                output += mapEntry.second->toString();
+                i++;
             }
 
Index: code/branches/cpp11_v2/src/libraries/core/ThreadPool.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/ThreadPool.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/ThreadPool.cc	(revision 10919)
@@ -83,11 +83,10 @@
     bool ThreadPool::passFunction( const ExecutorPtr& executor, bool addThread )
     {
-        std::vector<Thread*>::iterator it;
-        for ( it=this->threadPool_.begin(); it!=this->threadPool_.end(); ++it )
+        for ( Thread* thread : threadPool_ )
         {
-            if ( ! (*it)->isWorking() )
+            if ( ! thread->isWorking() )
             {
                 // If that fails, then there is some code error
-                OrxVerify( (*it)->evaluateExecutor( executor ), "ERROR: could not evaluate Executor" );
+                OrxVerify( thread->evaluateExecutor( executor ), "ERROR: could not evaluate Executor" );
                 return true;
             }
@@ -105,8 +104,7 @@
     void ThreadPool::synchronise()
     {
-        std::vector<Thread*>::iterator it;
-        for ( it=this->threadPool_.begin(); it!=this->threadPool_.end(); ++it )
+        for ( Thread* thread : this->threadPool_ )
         {
-            (*it)->waitUntilFinished();
+            thread->waitUntilFinished();
         }
     }
Index: code/branches/cpp11_v2/src/libraries/core/WindowEventListener.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/WindowEventListener.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/WindowEventListener.cc	(revision 10919)
@@ -45,6 +45,6 @@
     /*static*/ void WindowEventListener::moveWindow()
     {
-        for (ObjectList<WindowEventListener>::iterator it = ObjectList<WindowEventListener>::begin(); it; ++it)
-            it->windowMoved();
+        for (WindowEventListener* listener : ObjectList<WindowEventListener>())
+            listener->windowMoved();
     }
 
@@ -54,6 +54,6 @@
         windowWidth_s = newWidth;
         windowHeight_s = newHeight;
-        for (ObjectList<WindowEventListener>::iterator it = ObjectList<WindowEventListener>::begin(); it; ++it)
-            it->windowResized(newWidth, newHeight);
+        for (WindowEventListener* listener : ObjectList<WindowEventListener>())
+            listener->windowResized(newWidth, newHeight);
     }
 
@@ -61,6 +61,6 @@
     /*static*/ void WindowEventListener::changeWindowFocus(bool bFocus)
     {
-        for (ObjectList<WindowEventListener>::iterator it = ObjectList<WindowEventListener>::begin(); it; ++it)
-            it->windowFocusChanged(bFocus);
+        for (WindowEventListener* listener : ObjectList<WindowEventListener>())
+            listener->windowFocusChanged(bFocus);
     }
 }
Index: code/branches/cpp11_v2/src/libraries/core/class/Identifier.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/class/Identifier.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/class/Identifier.cc	(revision 10919)
@@ -79,12 +79,12 @@
             delete this->factory_;
 
-        for (std::list<const InheritsFrom*>::const_iterator it = this->manualDirectParents_.begin(); it != this->manualDirectParents_.end(); ++it)
-            delete (*it);
+        for (const InheritsFrom* manualDirectParent : this->manualDirectParents_)
+            delete manualDirectParent;
 
         // erase this Identifier from all related identifiers
-        for (std::list<const Identifier*>::const_iterator it = this->parents_.begin(); it != this->parents_.end(); ++it)
-            const_cast<Identifier*>(*it)->children_.erase(this);
-        for (std::list<const Identifier*>::const_iterator it = this->directParents_.begin(); it != this->directParents_.end(); ++it)
-            const_cast<Identifier*>(*it)->directChildren_.erase(this);
+        for (const Identifier* parent : this->parents_)
+            const_cast<Identifier*>(parent)->children_.erase(this);
+        for (const Identifier* directParent : this->directParents_)
+            const_cast<Identifier*>(directParent)->directChildren_.erase(this);
         for (const Identifier* child : this->children_)
             const_cast<Identifier*>(child)->parents_.remove(this);
@@ -184,12 +184,12 @@
 
             // initialize all parents
-            for (std::list<const Identifier*>::const_iterator it = this->parents_.begin(); it != this->parents_.end(); ++it)
-                const_cast<Identifier*>(*it)->finishInitialization(); // initialize parent
+            for (const Identifier* parent : this->parents_)
+                const_cast<Identifier*>(parent)->finishInitialization(); // initialize parent
 
             // parents of parents are no direct parents of this identifier
             this->directParents_ = this->parents_;
-            for (std::list<const Identifier*>::const_iterator it_parent = this->parents_.begin(); it_parent != this->parents_.end(); ++it_parent)
-                for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(*it_parent)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(*it_parent)->parents_.end(); ++it_parent_parent)
-                    this->directParents_.remove(*it_parent_parent);
+            for (const Identifier* parent : this->parents_)
+                for (const Identifier* parent_parent : const_cast<Identifier*>(parent)->parents_)
+                    this->directParents_.remove(parent_parent);
 
             this->verifyIdentifierTrace();
@@ -200,7 +200,7 @@
 
             // initialize all direct parents
-            for (std::list<const InheritsFrom*>::const_iterator it = this->manualDirectParents_.begin(); it != this->manualDirectParents_.end(); ++it)
+            for (const InheritsFrom* manualDirectParent : this->manualDirectParents_)
             {
-                Identifier* directParent = (*it)->getParent();
+                Identifier* directParent = manualDirectParent->getParent();
                 this->directParents_.push_back(directParent);
                 directParent->finishInitialization(); // initialize parent
@@ -208,9 +208,9 @@
 
             // direct parents and their parents are also parents of this identifier (but only add them once)
-            for (std::list<const Identifier*>::const_iterator it_parent = this->directParents_.begin(); it_parent != this->directParents_.end(); ++it_parent)
+            for (const Identifier* parent : this->directParents_)
             {
-                for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(*it_parent)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(*it_parent)->parents_.end(); ++it_parent_parent)
-                    this->addIfNotExists(this->parents_, *it_parent_parent);
-                this->addIfNotExists(this->parents_, *it_parent);
+                for (const Identifier* parent_parent : const_cast<Identifier*>(parent)->parents_)
+                    this->addIfNotExists(this->parents_, parent_parent);
+                this->addIfNotExists(this->parents_, parent);
             }
         }
@@ -224,14 +224,14 @@
 
         // tell all parents that this identifier is a child
-        for (std::list<const Identifier*>::const_iterator it = this->parents_.begin(); it != this->parents_.end(); ++it)
-            const_cast<Identifier*>(*it)->children_.insert(this);
+        for (const Identifier* parent : this->parents_)
+            const_cast<Identifier*>(parent)->children_.insert(this);
 
         // tell all direct parents that this identifier is a direct child
-        for (std::list<const Identifier*>::const_iterator it = this->directParents_.begin(); it != this->directParents_.end(); ++it)
-        {
-            const_cast<Identifier*>(*it)->directChildren_.insert(this);
+        for (const Identifier* directChild : this->directParents_)
+        {
+            const_cast<Identifier*>(directChild)->directChildren_.insert(this);
 
             // Create the super-function dependencies
-            (*it)->createSuperFunctionCaller();
+            directChild->createSuperFunctionCaller();
         }
 
@@ -265,6 +265,6 @@
             if (parent->isVirtualBase())
             {
-                for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(parent)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(parent)->parents_.end(); ++it_parent_parent)
-                    this->addIfNotExists(expectedIdentifierTrace, *it_parent_parent);
+                for (const Identifier* parent_parent : const_cast<Identifier*>(parent)->parents_)
+                    this->addIfNotExists(expectedIdentifierTrace, parent_parent);
                 this->addIfNotExists(expectedIdentifierTrace, parent);
             }
@@ -274,6 +274,6 @@
         for (const Identifier* directParent : this->directParents_)
         {
-            for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(directParent)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(directParent)->parents_.end(); ++it_parent_parent)
-                this->addIfNotExists(expectedIdentifierTrace, *it_parent_parent);
+            for (const Identifier* parent_parent : const_cast<Identifier*>(directParent)->parents_)
+                this->addIfNotExists(expectedIdentifierTrace, parent_parent);
             this->addIfNotExists(expectedIdentifierTrace, directParent);
         }
@@ -290,6 +290,6 @@
 
             orxout(internal_warning) << "  Expected trace (according to class hierarchy definitions):" << endl << "    ";
-            for (std::list<const Identifier*>::const_iterator it_parent = expectedIdentifierTrace.begin(); it_parent != expectedIdentifierTrace.end(); ++it_parent)
-                orxout(internal_warning) << " " << (*it_parent)->getName();
+            for (const Identifier* parent : expectedIdentifierTrace)
+                orxout(internal_warning) << " " << parent->getName();
             orxout(internal_warning) << endl;
 
Index: code/branches/cpp11_v2/src/libraries/core/class/Identifier.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/class/Identifier.h	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/class/Identifier.h	(revision 10919)
@@ -458,6 +458,6 @@
             return;
 
-        for (ObjectListIterator<T> it = ObjectList<T>::begin(); it; ++it)
-            this->setConfigValues(*it, *it);
+        for (T* object : ObjectList<T>())
+            this->setConfigValues(object, object);
 
         if (updateChildren)
Index: code/branches/cpp11_v2/src/libraries/core/class/Super.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/class/Super.h	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/class/Super.h	(revision 10919)
@@ -103,20 +103,20 @@
             { \
                 ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier(); \
-                for (std::set<const Identifier*>::iterator it = identifier->getDirectChildren().begin(); it != identifier->getDirectChildren().end(); ++it) \
+                for (const Identifier* child : identifier->getDirectChildren()) \
                 { \
-                    if (((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ && ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_) \
+                    if (((ClassIdentifier<T>*)child)->bSuperFunctionCaller_##functionname##_isFallback_ && ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_) \
                     { \
-                        delete ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_; \
-                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = nullptr; \
-                        ((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ = false; \
+                        delete ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_; \
+                        ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_ = nullptr; \
+                        ((ClassIdentifier<T>*)child)->bSuperFunctionCaller_##functionname##_isFallback_ = false; \
                     } \
                     \
-                    if (!((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_) \
+                    if (!((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_) \
                     { \
-                        orxout(verbose, context::super) << "Added SuperFunctionCaller for " << #functionname << ": " << ClassIdentifier<T>::getIdentifier()->getName() << " <- " << ((ClassIdentifier<T>*)(*it))->getName() << endl; \
-                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>; \
+                        orxout(verbose, context::super) << "Added SuperFunctionCaller for " << #functionname << ": " << ClassIdentifier<T>::getIdentifier()->getName() << " <- " << ((ClassIdentifier<T>*)child)->getName() << endl; \
+                        ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>; \
                     } \
-                    else if (((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_->getParentIdentifier() != ClassIdentifier<T>::getIdentifier()) \
-                        orxout(internal_warning, context::super) << "SuperFunctionCaller for " << #functionname << " in " << ((ClassIdentifier<T>*)(*it))->getName() << " calls function of " << ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_->getParentIdentifier()->getName() << " but " << ClassIdentifier<T>::getIdentifier()->getName() << " is also possible (do you use multiple inheritance?)" << endl; \
+                    else if (((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_->getParentIdentifier() != ClassIdentifier<T>::getIdentifier()) \
+                        orxout(internal_warning, context::super) << "SuperFunctionCaller for " << #functionname << " in " << ((ClassIdentifier<T>*)child)->getName() << " calls function of " << ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_->getParentIdentifier()->getName() << " but " << ClassIdentifier<T>::getIdentifier()->getName() << " is also possible (do you use multiple inheritance?)" << endl; \
                 } \
             } \
@@ -171,26 +171,26 @@
 
                 // Iterate through all children
-                for (std::set<const Identifier*>::iterator it = identifier->getDirectChildren().begin(); it != identifier->getDirectChildren().end(); ++it)
+                for (const Identifier* child : identifier->getDirectChildren())
                 {
                     // Check if the caller is a fallback-caller
-                    if (((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ && ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_)
+                    if (((ClassIdentifier<T>*)child)->bSuperFunctionCaller_##functionname##_isFallback_ && ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_)
                     {
                         // Delete the fallback caller an prepare to get a real caller
-                        delete ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_;
-                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = nullptr;
-                        ((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ = false;
+                        delete ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_;
+                        ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_ = nullptr;
+                        ((ClassIdentifier<T>*)child)->bSuperFunctionCaller_##functionname##_isFallback_ = false;
                     }
 
                     // Check if there's not already a caller
-                    if (!((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_)
+                    if (!((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_)
                     {
                         // Add the SuperFunctionCaller
-                        orxout(verbose, context::super) << "adding functionpointer to " << ((ClassIdentifier<T>*)(*it))->getName() << endl;
-                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>;
+                        orxout(verbose, context::super) << "adding functionpointer to " << ((ClassIdentifier<T>*)child)->getName() << endl;
+                        ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>;
                     }
 
                     // If there is already a caller, but for another parent, print a warning
-                    else if (((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_->getParentIdentifier() != ClassIdentifier<T>::getIdentifier())
-                        orxout(internal_warning, context::super) << "SuperFunctionCaller for " << #functionname << " in " << ((ClassIdentifier<T>*)(*it))->getName() << " calls function of " << ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_->getParentIdentifier()->getName() << " but " << ClassIdentifier<T>::getIdentifier()->getName() << " is also possible (do you use multiple inheritance?)" << endl;
+                    else if (((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_->getParentIdentifier() != ClassIdentifier<T>::getIdentifier())
+                        orxout(internal_warning, context::super) << "SuperFunctionCaller for " << #functionname << " in " << ((ClassIdentifier<T>*)child)->getName() << " calls function of " << ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_->getParentIdentifier()->getName() << " but " << ClassIdentifier<T>::getIdentifier()->getName() << " is also possible (do you use multiple inheritance?)" << endl;
                 }
             }
Index: code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 10919)
@@ -334,6 +334,6 @@
             ArgumentCompletionList threads;
 
-            for (std::list<unsigned int>::const_iterator it = threadnumbers.begin(); it != threadnumbers.end(); ++it)
-                threads.emplace_back(multi_cast<std::string>(*it));
+            for (unsigned int threadnumber : threadnumbers)
+                threads.emplace_back(multi_cast<std::string>(threadnumber));
 
             return threads;
Index: code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc	(revision 10919)
@@ -328,11 +328,11 @@
 
         // iterate through all groups and their commands and calculate the distance to the current command. keep the best.
-        for (const auto& mapEntry : ConsoleCommandManager::getInstance().getCommandsLC())
-        {
-            if (mapEntry.first != "")
-            {
-                for (std::map<std::string, ConsoleCommand*>::const_iterator it_name = mapEntry.second.begin(); it_name != mapEntry.second.end(); ++it_name)
-                {
-                    std::string command = mapEntry.first + " " + it_name->first;
+        for (const auto& mapEntryGroup : ConsoleCommandManager::getInstance().getCommandsLC())
+        {
+            if (mapEntryGroup.first != "")
+            {
+                for (const auto& mapEntryName : mapEntryGroup.second)
+                {
+                    std::string command = mapEntryGroup.first + " " + mapEntryName.first;
                     unsigned int distance = getLevenshteinDistance(command, token0_LC + " " + token1_LC);
                     if (distance < nearestDistance)
Index: code/branches/cpp11_v2/src/libraries/core/command/TclThreadManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/TclThreadManager.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/command/TclThreadManager.cc	(revision 10919)
@@ -145,10 +145,10 @@
             {
                 boost::shared_lock<boost::shared_mutex> lock(*this->interpreterBundlesMutex_);
-                for (std::map<unsigned int, TclInterpreterBundle*>::const_iterator it = this->interpreterBundles_.begin(); it != this->interpreterBundles_.end(); ++it)
+                for (const auto& mapEntry : this->interpreterBundles_)
                 {
-                    if (it->first == 0)
+                    if (mapEntry.first == 0)
                         continue; // We'll handle the default interpreter later (and without threads of course)
 
-                    TclInterpreterBundle* bundle = it->second;
+                    TclInterpreterBundle* bundle = mapEntry.second;
                     if (!bundle->queue_.empty())
                     {
Index: code/branches/cpp11_v2/src/libraries/core/commandline/CommandLineParser.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/commandline/CommandLineParser.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/commandline/CommandLineParser.cc	(revision 10919)
@@ -110,11 +110,10 @@
             {
                 // first shove all the shortcuts in a map
-                for (std::map<std::string, CommandLineArgument*>::const_iterator it = cmdLineArgs_.begin();
-                    it != cmdLineArgs_.end(); ++it)
+                for (const auto& mapEntry : cmdLineArgs_)
                 {
-                    OrxAssert(cmdLineArgsShortcut_.find(it->second->getShortcut()) == cmdLineArgsShortcut_.end(),
+                    OrxAssert(cmdLineArgsShortcut_.find(mapEntry.second->getShortcut()) == cmdLineArgsShortcut_.end(),
                         "Cannot have two command line shortcut with the same name.");
-                    if (!it->second->getShortcut().empty())
-                        cmdLineArgsShortcut_[it->second->getShortcut()] = it->second;
+                    if (!mapEntry.second->getShortcut().empty())
+                        cmdLineArgsShortcut_[mapEntry.second->getShortcut()] = mapEntry.second;
                 }
                 bFirstTimeParse_ = false;
@@ -257,8 +256,7 @@
         // determine maximum name size
         size_t maxNameSize = 0;
-        for (std::map<std::string, CommandLineArgument*>::const_iterator it = inst.cmdLineArgs_.begin();
-            it != inst.cmdLineArgs_.end(); ++it)
-        {
-            maxNameSize = std::max(it->second->getName().size(), maxNameSize);
+        for (const auto& mapEntry : inst.cmdLineArgs_)
+        {
+            maxNameSize = std::max(mapEntry.second->getName().size(), maxNameSize);
         }
 
@@ -267,19 +265,18 @@
         infoStr << "Available options:" << endl;
 
-        for (std::map<std::string, CommandLineArgument*>::const_iterator it = inst.cmdLineArgs_.begin();
-            it != inst.cmdLineArgs_.end(); ++it)
-        {
-            if (!it->second->getShortcut().empty())
-                infoStr << " [-" << it->second->getShortcut() << "] ";
+        for (const auto& mapEntry : inst.cmdLineArgs_)
+        {
+            if (!mapEntry.second->getShortcut().empty())
+                infoStr << " [-" << mapEntry.second->getShortcut() << "] ";
             else
                 infoStr << "      ";
-            infoStr << "--" << it->second->getName() << ' ';
-            if (it->second->getValue().isType<bool>())
+            infoStr << "--" << mapEntry.second->getName() << ' ';
+            if (mapEntry.second->getValue().isType<bool>())
                 infoStr << "    ";
             else
                 infoStr << "ARG ";
             // fill with the necessary amount of blanks
-            infoStr << std::string(maxNameSize - it->second->getName().size(), ' ');
-            infoStr << ": " << it->second->getInformation();
+            infoStr << std::string(maxNameSize - mapEntry.second->getName().size(), ' ');
+            infoStr << ": " << mapEntry.second->getInformation();
             infoStr << endl;
         }
Index: code/branches/cpp11_v2/src/libraries/core/config/SettingsConfigFile.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/config/SettingsConfigFile.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/config/SettingsConfigFile.cc	(revision 10919)
@@ -142,8 +142,8 @@
         // todo: can this be done more efficiently? looks like some identifiers will be updated multiple times.
 
-        for (ContainerMap::const_iterator it = this->containers_.begin(); it != this->containers_.end(); ++it)
-        {
-            it->second.second->update();
-            it->second.second->getIdentifier()->updateConfigValues();
+        for (const auto& mapEntry : this->containers_)
+        {
+            mapEntry.second.second->update();
+            mapEntry.second.second->getIdentifier()->updateConfigValues();
         }
     }
Index: code/branches/cpp11_v2/src/libraries/core/input/InputBuffer.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/InputBuffer.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/input/InputBuffer.cc	(revision 10919)
@@ -75,7 +75,6 @@
     InputBuffer::~InputBuffer()
     {
-        for (std::list<BaseInputBufferListenerTuple*>::const_iterator it = this->listeners_.begin();
-            it != this->listeners_.end(); ++it)
-            delete *it;
+        for (BaseInputBufferListenerTuple* listener : this->listeners_)
+            delete listener;
     }
 
Index: code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc	(revision 10919)
@@ -531,8 +531,7 @@
             {
                 // Make sure we don't add two high priority states with the same priority
-                for (std::map<std::string, InputState*>::const_iterator it = this->statesByName_.begin();
-                    it != this->statesByName_.end(); ++it)
+                for (const auto& mapEntry : this->statesByName_)
                 {
-                    if (it->second->getPriority() == priority)
+                    if (mapEntry.second->getPriority() == priority)
                     {
                         orxout(internal_warning, context::input) << "Could not add an InputState with the same priority '"
Index: code/branches/cpp11_v2/src/libraries/core/input/JoyStickQuantityListener.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/JoyStickQuantityListener.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/input/JoyStickQuantityListener.cc	(revision 10919)
@@ -47,6 +47,6 @@
     {
         joyStickList_s = joyStickList;
-        for (ObjectList<JoyStickQuantityListener>::iterator it = ObjectList<JoyStickQuantityListener>::begin(); it; ++it)
-            it->JoyStickQuantityChanged(joyStickList);
+        for (JoyStickQuantityListener* listener : ObjectList<JoyStickQuantityListener>())
+            listener->JoyStickQuantityChanged(joyStickList);
     }
 }
Index: code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc	(revision 10919)
@@ -274,8 +274,8 @@
 
         // Parse bindings and create the ConfigValueContainers if necessary
-        for (std::map<std::string, Button*>::const_iterator it = allButtons_.begin(); it != allButtons_.end(); ++it)
-        {
-            it->second->readBinding(this->configFile_, this->fallbackConfigFile_);
-            addButtonToCommand(it->second->bindingString_, it->second);
+        for (const auto& mapEntry : allButtons_)
+        {
+            mapEntry.second->readBinding(this->configFile_, this->fallbackConfigFile_);
+            addButtonToCommand(mapEntry.second->bindingString_, mapEntry.second);
         }
 
@@ -380,6 +380,6 @@
     void KeyBinder::clearBindings()
     {
-        for (std::map<std::string, Button*>::const_iterator it = allButtons_.begin(); it != allButtons_.end(); ++it)
-            it->second->clear();
+        for (const auto& mapEntry : allButtons_)
+            mapEntry.second->clear();
 
         for (BufferedParamCommand* command : paramCommandBuffer_)
Index: code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc	(revision 10919)
@@ -76,6 +76,6 @@
     {
         // Delete all remaining KeyBinders
-        for (std::map<std::string, KeyBinder*>::const_iterator it = this->binders_.begin(); it != this->binders_.end(); ++it)
-            delete it->second;
+        for (const auto& mapEntry : this->binders_)
+            delete mapEntry.second;
 
         // Reset console commands
Index: code/branches/cpp11_v2/src/libraries/core/input/KeyDetector.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/KeyDetector.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/input/KeyDetector.cc	(revision 10919)
@@ -70,6 +70,6 @@
     {
         // Assign every button/axis the same command, but with its name as argument
-        for (std::map<std::string, Button*>::const_iterator it = allButtons_.begin(); it != allButtons_.end(); ++it)
-            it->second->parse(__CC_KeyDetector_callback_name + ' ' + it->second->groupName_ + "." + it->second->name_);
+        for (const auto& mapEntry : allButtons_)
+            mapEntry.second->parse(__CC_KeyDetector_callback_name + ' ' + mapEntry.second->groupName_ + "." + mapEntry.second->name_);
     }
 
Index: code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc	(revision 10919)
@@ -76,6 +76,6 @@
         this->staticallyInitializedInstancesByType_.clear();
         for (const auto& mapEntry : copy)
-            for (std::set<StaticallyInitializedInstance*>::iterator it2 = mapEntry.second.begin(); it2 != mapEntry.second.end(); ++it2)
-                delete (*it2);
+            for (StaticallyInitializedInstance* instance : mapEntry.second)
+                delete instance;
     }
 
Index: code/branches/cpp11_v2/src/libraries/network/Client.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/Client.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/Client.cc	(revision 10919)
@@ -161,8 +161,7 @@
         {
           std::vector<packet::Gamestate*> gamestates = GamestateManager::getGamestates();
-          std::vector<packet::Gamestate*>::iterator it;
-          for( it = gamestates.begin(); it != gamestates.end(); ++it )
+          for( packet::Gamestate* gamestate : gamestates )
           {
-            (*it)->send( static_cast<Host*>(this) );
+            gamestate->send( static_cast<Host*>(this) );
           }
         }
Index: code/branches/cpp11_v2/src/libraries/network/ClientConnectionListener.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/ClientConnectionListener.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/ClientConnectionListener.cc	(revision 10919)
@@ -44,12 +44,12 @@
     void ClientConnectionListener::broadcastClientConnected(unsigned int clientID)
     {
-        for (ObjectList<ClientConnectionListener>::iterator it = ObjectList<ClientConnectionListener>::begin(); it != ObjectList<ClientConnectionListener>::end(); ++it)
-            it->clientConnected(clientID);
+        for (ClientConnectionListener* listener : ObjectList<ClientConnectionListener>())
+            listener->clientConnected(clientID);
     }
 
     void ClientConnectionListener::broadcastClientDisconnected(unsigned int clientID)
     {
-        for (ObjectList<ClientConnectionListener>::iterator it = ObjectList<ClientConnectionListener>::begin(); it != ObjectList<ClientConnectionListener>::end(); ++it)
-            it->clientDisconnected(clientID);
+        for (ClientConnectionListener* listener : ObjectList<ClientConnectionListener>())
+            listener->clientDisconnected(clientID);
     }
 
Index: code/branches/cpp11_v2/src/libraries/network/Connection.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/Connection.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/Connection.cc	(revision 10919)
@@ -237,8 +237,7 @@
   void Connection::disconnectPeersInternal()
   {
-    std::map<uint32_t, ENetPeer*>::iterator it;
-    for( it=this->peerMap_.begin(); it!=this->peerMap_.end(); ++it )
-    {
-      enet_peer_disconnect(it->second, 0);
+    for( const auto& mapEntry : this->peerMap_ )
+    {
+      enet_peer_disconnect(mapEntry.second, 0);
     }
     uint32_t iterations = NETWORK_DISCONNECT_TIMEOUT/NETWORK_WAIT_TIMEOUT;
Index: code/branches/cpp11_v2/src/libraries/network/FunctionCallManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/FunctionCallManager.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/FunctionCallManager.cc	(revision 10919)
@@ -54,9 +54,8 @@
 void FunctionCallManager::sendCalls(orxonox::Host* host)
 {
-  std::map<uint32_t, packet::FunctionCalls*>::iterator it;
-  for (it = FunctionCallManager::sPeerMap_.begin(); it != FunctionCallManager::sPeerMap_.end(); ++it )
+  for (const auto& mapEntry : FunctionCallManager::sPeerMap_ )
   {
     assert(!FunctionCallManager::sPeerMap_.empty());
-    it->second->send(host);
+    mapEntry.second->send(host);
   }
   FunctionCallManager::sPeerMap_.clear();
Index: code/branches/cpp11_v2/src/libraries/network/GamestateManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/GamestateManager.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/GamestateManager.cc	(revision 10919)
@@ -70,13 +70,11 @@
   {
     if( this->currentGamestate_ )
-        delete this->currentGamestate_;std::map<unsigned int, packet::Gamestate*>::iterator it;
-    for( it = gamestateQueue.begin(); it != gamestateQueue.end(); ++it )
-      delete it->second;
-    std::map<uint32_t, peerInfo>::iterator peerIt;
-    std::map<uint32_t, packet::Gamestate*>::iterator gamestateIt;
-    for( peerIt = peerMap_.begin(); peerIt != peerMap_.end(); ++peerIt )
-    {
-      for( gamestateIt = peerIt->second.gamestates.begin(); gamestateIt != peerIt->second.gamestates.end(); ++gamestateIt )
-        delete gamestateIt->second;
+        delete this->currentGamestate_;
+    for( const auto& mapEntry : gamestateQueue )
+      delete mapEntry.second;
+    for( const auto& mapEntryPeer : peerMap_ )
+    {
+      for( const auto& mapEntryGamestate : mapEntryPeer.second.gamestates )
+        delete mapEntryGamestate.second;
     }
 //     this->trafficControl_->destroy();
@@ -107,11 +105,10 @@
     if( this->gamestateQueue.empty() )
         return true;
-    std::map<unsigned int, packet::Gamestate*>::iterator it;
     // now push only the most recent gamestates we received (ignore obsolete ones)
-    for(it = gamestateQueue.begin(); it!=gamestateQueue.end(); it++)
-    {
-      OrxVerify(processGamestate(it->second), "ERROR: could not process Gamestate");
-      sendAck( it->second->getID(), it->second->getPeerID() );
-      delete it->second;
+    for(const auto& mapEntry : gamestateQueue)
+    {
+      OrxVerify(processGamestate(mapEntry.second), "ERROR: could not process Gamestate");
+      sendAck( mapEntry.second->getID(), mapEntry.second->getPeerID() );
+      delete mapEntry.second;
     }
     // now clear the queue
@@ -177,17 +174,16 @@
     std::vector<packet::Gamestate*> peerGamestates;
     
-    std::map<uint32_t, peerInfo>::iterator peerIt;
-    for( peerIt=peerMap_.begin(); peerIt!=peerMap_.end(); ++peerIt )
-    {
-      if( !peerIt->second.isSynched )
+    for( const auto& mapEntry : peerMap_ )
+    {
+      if( !mapEntry.second.isSynched )
       {
         orxout(verbose_more, context::network) << "Server: not sending gamestate" << endl;
         continue;
       }
-      orxout(verbose_more, context::network) << "client id: " << peerIt->first << endl;
+      orxout(verbose_more, context::network) << "client id: " << mapEntry.first << endl;
       orxout(verbose_more, context::network) << "Server: doing gamestate gamestate preparation" << endl;
-      int peerID = peerIt->first; //get client id
-
-      unsigned int lastAckedGamestateID = peerIt->second.lastAckedGamestateID;
+      int peerID = mapEntry.first; //get client id
+
+      unsigned int lastAckedGamestateID = mapEntry.second.lastAckedGamestateID;
 
       packet::Gamestate* baseGamestate=nullptr;
@@ -340,8 +336,7 @@
   {
     assert(peerMap_.find(peerID)!=peerMap_.end());
-    std::map<uint32_t, packet::Gamestate*>::iterator peerIt;
-    for( peerIt = peerMap_[peerID].gamestates.begin(); peerIt!=peerMap_[peerID].gamestates.end(); ++peerIt )
-    {
-      delete peerIt->second;
+    for( const auto& mapEntry : peerMap_[peerID].gamestates )
+    {
+      delete mapEntry.second;
     }
     peerMap_.erase(peerMap_.find(peerID));
Index: code/branches/cpp11_v2/src/libraries/network/Host.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/Host.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/Host.cc	(revision 10919)
@@ -107,6 +107,6 @@
   void Host::doReceiveChat(const std::string& message, unsigned int sourceID, unsigned int targetID)
   {
-    for (ObjectList<NetworkChatListener>::iterator it = ObjectList<NetworkChatListener>::begin(); it != ObjectList<NetworkChatListener>::end(); ++it)
-      it->incomingChat(message, sourceID);
+    for (NetworkChatListener* listener : ObjectList<NetworkChatListener>())
+      listener->incomingChat(message, sourceID);
   }
 
Index: code/branches/cpp11_v2/src/libraries/network/MasterServer.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/MasterServer.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/MasterServer.cc	(revision 10919)
@@ -49,15 +49,11 @@
   MasterServer::listServers( void )
   {
-    /* get an iterator */
-    std::list<ServerListElem>::iterator i;
-
     /* print list header */
     orxout(user_info) << "List of connected servers" << std::endl;
 
     /* loop through list elements */
-    for( i = MasterServer::getInstance()->mainlist.serverlist.begin();
-      i != MasterServer::getInstance()->mainlist.serverlist.end(); ++i )
+    for( const ServerListElem& elem : MasterServer::getInstance()->mainlist.serverlist )
     {
-      orxout(user_info) << "  " << (*i).ServerInfo.getServerIP() << std::endl;
+      orxout(user_info) << "  " << elem.ServerInfo.getServerIP() << std::endl;
     }
 
@@ -112,17 +108,13 @@
   MasterServer::helper_sendlist( ENetEvent *event )
   {
-    /* get an iterator */
-    std::list<ServerListElem>::iterator i;
-
     /* packet holder */
     ENetPacket *reply;
 
     /* loop through list elements */
-    for( i = mainlist.serverlist.begin(); i
-        != mainlist.serverlist.end(); ++i )
+    for( const ServerListElem& elem : mainlist.serverlist )
     {
       /* send this particular server */
       /* build reply string */
-      int packetlen = MSPROTO_SERVERLIST_ITEM_LEN + 1 + (*i).ServerInfo.getServerIP().length() + 1 + (*i).ServerInfo.getServerName().length() + 1 + sizeof((*i).ServerInfo.getClientNumber()) + 1;
+      int packetlen = MSPROTO_SERVERLIST_ITEM_LEN + 1 + elem.ServerInfo.getServerIP().length() + 1 + elem.ServerInfo.getServerName().length() + 1 + sizeof(elem.ServerInfo.getClientNumber()) + 1;
       char *tosend = (char *)calloc(packetlen ,1 );
       if( !tosend )
@@ -131,5 +123,5 @@
       }
       sprintf( tosend, "%s %s %s %u", MSPROTO_SERVERLIST_ITEM,
-          (*i).ServerInfo.getServerIP().c_str(), (*i).ServerInfo.getServerName().c_str(), (*i).ServerInfo.getClientNumber());
+          elem.ServerInfo.getServerIP().c_str(), elem.ServerInfo.getServerName().c_str(), elem.ServerInfo.getClientNumber());
 
       /* create packet from it */
@@ -167,21 +159,17 @@
   MasterServer::helper_cleanupServers( void )
   {
-    /* get an iterator */
-    std::list<ServerListElem>::iterator i;
-
     if( mainlist.serverlist.size() == 0 )
       return;
 
     /* loop through list elements */
-    for( i = mainlist.serverlist.begin(); i
-        != mainlist.serverlist.end(); ++i )
+    for( const ServerListElem& elem : mainlist.serverlist )
     { /* see if we have a disconnected peer */
-      if( (*i).peer &&
-         ((*i).peer->state == ENET_PEER_STATE_DISCONNECTED ||
-          (*i).peer->state == ENET_PEER_STATE_ZOMBIE ))
+      if( elem.peer &&
+         (elem.peer->state == ENET_PEER_STATE_DISCONNECTED ||
+          elem.peer->state == ENET_PEER_STATE_ZOMBIE ))
       {
         /* Remove it from the list */
-        orxout(internal_warning) << (char*)(*i).peer->data << " timed out.\n";
-        mainlist.delServerByName( (*i).ServerInfo.getServerName() );
+        orxout(internal_warning) << (char*)elem.peer->data << " timed out.\n";
+        mainlist.delServerByName( elem.ServerInfo.getServerName() );
 
         /* stop iterating, we manipulated the list */
Index: code/branches/cpp11_v2/src/libraries/network/PeerList.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/PeerList.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/PeerList.cc	(revision 10919)
@@ -65,12 +65,10 @@
   bool
   PeerList::remPeerByAddr( ENetAddress addr )
-  { /* get an iterator */
-    std::list<ENetPeer *>::iterator i;
-
+  {
     /* loop through list elements */
-    for( i = peerlist.begin(); i != peerlist.end(); ++i )
-      if( !sub_compAddr((*i)->address, addr ) )
+    for( ENetPeer* peer : peerlist )
+      if( !sub_compAddr(peer->address, addr ) )
       { /* found this name, remove and quit */
-        this->peerlist.remove( *i );
+        this->peerlist.remove( peer );
         return true;
       }
@@ -82,12 +80,10 @@
   ENetPeer *
   PeerList::findPeerByAddr( ENetAddress addr )
-  { /* get an iterator */
-    std::list<ENetPeer *>::iterator i;
-
+  {
     /* loop through list elements */
-    for( i = peerlist.begin(); i != peerlist.end(); ++i )
-      if( !sub_compAddr((*i)->address, addr ) )
+    for( ENetPeer* peer : peerlist )
+      if( !sub_compAddr(peer->address, addr ) )
         /* found this name, remove and quit */
-        return *i;
+        return peer;
 
     /* not found */
Index: code/branches/cpp11_v2/src/libraries/network/Server.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/Server.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/Server.cc	(revision 10919)
@@ -232,8 +232,7 @@
   {
     std::vector<packet::Gamestate*> gamestates = GamestateManager::getGamestates();
-    std::vector<packet::Gamestate*>::iterator it;
-    for( it = gamestates.begin(); it != gamestates.end(); ++it )
+    for( packet::Gamestate* gamestate : gamestates )
     {
-      (*it)->send(static_cast<Host*>(this));
+      gamestate->send(static_cast<Host*>(this));
     }
     return true;
@@ -434,7 +433,6 @@
       return true;
 
-    std::vector<uint32_t>::iterator it;
-    for( it=this->clientIDs_.begin(); it!=this->clientIDs_.end(); ++it )
-      if( *it == targetID )
+    for( uint32_t id : this->clientIDs_ )
+      if( id == targetID )
         return true;
 
Index: code/branches/cpp11_v2/src/libraries/network/packet/ClassID.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/packet/ClassID.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/packet/ClassID.cc	(revision 10919)
@@ -55,7 +55,6 @@
 
   //calculate total needed size (for all strings and integers)
-  std::map<std::string, Identifier*>::const_iterator it = IdentifierManager::getInstance().getIdentifierByStringMap().begin();
-  for(;it != IdentifierManager::getInstance().getIdentifierByStringMap().end();++it){
-    id = it->second;
+  for(const auto& mapEntry : IdentifierManager::getInstance().getIdentifierByStringMap()){
+    id = mapEntry.second;
     if(id == nullptr || !id->hasFactory())
       continue;
Index: code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.cc	(revision 10919)
@@ -213,14 +213,13 @@
   {
     std::list<uint32_t> v1;
-    ObjectList<Synchronisable>::iterator it;
-    for (it = ObjectList<Synchronisable>::begin(); it != ObjectList<Synchronisable>::end(); ++it)
-    {
-      if (it->getObjectID() == OBJECTID_UNKNOWN)
-      {
-        if (it->objectMode_ != 0x0)
+    for (Synchronisable* synchronisable : ObjectList<Synchronisable>())
+    {
+      if (synchronisable->getObjectID() == OBJECTID_UNKNOWN)
+      {
+        if (synchronisable->objectMode_ != 0x0)
         {
           orxout(user_error, context::packets) << "Found object with OBJECTID_UNKNOWN on the client with objectMode != 0x0!" << endl;
           orxout(user_error, context::packets) << "Possible reason for this error: Client created a synchronized object without the Server's approval." << endl;
-          orxout(user_error, context::packets) << "Objects class: " << it->getIdentifier()->getName() << endl;
+          orxout(user_error, context::packets) << "Objects class: " << synchronisable->getIdentifier()->getName() << endl;
           assert(false);
         }
@@ -228,8 +227,7 @@
       else
       {
-        std::list<uint32_t>::iterator it2;
-        for (it2 = v1.begin(); it2 != v1.end(); ++it2)
+        for (uint32_t id : v1)
         {
-          if (it->getObjectID() == *it2)
+          if (synchronisable->getObjectID() == id)
           {
             orxout(user_error, context::packets) << "Found duplicate objectIDs on the client!" << endl
@@ -239,5 +237,5 @@
           }
         }
-        v1.push_back(it->getObjectID());
+        v1.push_back(synchronisable->getObjectID());
       }
     }
@@ -762,10 +760,8 @@
   uint32_t size = 0;
   uint32_t nrOfVariables = 0;
-    // get the start of the Synchronisable list
-  ObjectList<Synchronisable>::iterator it;
     // get total size of gamestate
-  for(it = ObjectList<Synchronisable>::begin(); it; ++it){
-    size+=it->getSize(id, mode); // size of the actual data of the synchronisable
-    nrOfVariables += it->getNrOfVariables();
+  for(Synchronisable* synchronisable : ObjectList<Synchronisable>()){
+    size+=synchronisable->getSize(id, mode); // size of the actual data of the synchronisable
+    nrOfVariables += synchronisable->getNrOfVariables();
   }
 //   orxout() << "allocating " << nrOfVariables << " ints" << endl;
Index: code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.h	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.h	(revision 10919)
@@ -50,10 +50,10 @@
         void          send( ENetPeer* peer );
         void          setServerName(std::string name) { this->serverName_ = name; }
-        std::string   getServerName() { return this->serverName_; }
+        std::string   getServerName() const { return this->serverName_; }
         void          setServerIP( std::string IP ) { this->serverIP_ = IP; }
-        std::string   getServerIP() { return this->serverIP_; }
+        std::string   getServerIP() const { return this->serverIP_; }
         void          setClientNumber( int clientNumber ) { this->clientNumber_ = clientNumber; }
-        int           getClientNumber() { return this->clientNumber_; }
-        uint32_t      getServerRTT() { return this->serverRTT_; }
+        int           getClientNumber() const { return this->clientNumber_; }
+        uint32_t      getServerRTT() const { return this->serverRTT_; }
 
       private:
Index: code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc	(revision 10919)
@@ -266,5 +266,4 @@
     assert(this->classID_==this->getIdentifier()->getNetworkID());
     assert(this->objectID_!=OBJECTID_UNKNOWN);
-    std::vector<SynchronisableVariableBase*>::iterator i;
 
     // start copy header
@@ -276,7 +275,7 @@
 //     orxout(verbose, context::network) << "objectid: " << this->objectID_ << ":";
     // copy to location
-    for(i=syncList_.begin(); i!=syncList_.end(); ++i)
-    {
-      uint32_t varsize = (*i)->getData( mem, mode );
+    for(SynchronisableVariableBase* variable : syncList_)
+    {
+      uint32_t varsize = variable->getData( mem, mode );
 //       orxout(verbose, context::network) << " " << varsize;
       tempsize += varsize;
@@ -348,9 +347,8 @@
       assert( this->getContextID() == syncHeader2.getContextID() );
       mem += SynchronisableHeader::getSize();
-      std::vector<SynchronisableVariableBase *>::iterator i;
-      for(i=syncList_.begin(); i!=syncList_.end(); ++i)
+      for(SynchronisableVariableBase* variable : syncList_)
       {
         assert( mem <= data+syncHeader2.getDataSize()+SynchronisableHeader::getSize() ); // always make sure we don't exceed the datasize in our stream
-        (*i)->putData( mem, mode, forceCallback );
+        variable->putData( mem, mode, forceCallback );
       }
       assert(mem == data+syncHeaderLight.getDataSize()+SynchronisableHeader::getSize() );
@@ -388,8 +386,7 @@
     assert( mode==state_ );
     tsize += this->dataSize_;
-    std::vector<SynchronisableVariableBase*>::iterator i;
-    for(i=stringList_.begin(); i!=stringList_.end(); ++i)
-    {
-      tsize += (*i)->getSize( mode );
+    for(SynchronisableVariableBase* variable : stringList_)
+    {
+      tsize += variable->getSize( mode );
     }
     return tsize;
Index: code/branches/cpp11_v2/src/libraries/tools/interfaces/ToolsInterfaceCompilation.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/tools/interfaces/ToolsInterfaceCompilation.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/tools/interfaces/ToolsInterfaceCompilation.cc	(revision 10919)
@@ -60,6 +60,6 @@
         float oldFactor = TimeFactorListener::timefactor_s;
         TimeFactorListener::timefactor_s = factor;
-        for (ObjectList<TimeFactorListener>::iterator it = ObjectList<TimeFactorListener>::begin(); it != ObjectList<TimeFactorListener>::end(); ++it)
-            it->changedTimeFactor(factor, oldFactor);
+        for (TimeFactorListener* listener : ObjectList<TimeFactorListener>())
+            listener->changedTimeFactor(factor, oldFactor);
     }
 
Index: code/branches/cpp11_v2/src/libraries/util/Serialise.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/Serialise.h	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/util/Serialise.h	(revision 10919)
@@ -679,8 +679,7 @@
     template <class T> inline void saveAndIncrease(  const std::set<T>& variable, uint8_t*& mem )
     {
-        typename std::set<T>::const_iterator it = variable.begin();
         saveAndIncrease( (uint32_t)variable.size(), mem );
-        for( ; it!=variable.end(); ++it )
-            saveAndIncrease( *it, mem );
+        for( const T& elem : variable )
+            saveAndIncrease( elem, mem );
     }
 
