Index: /code/branches/cpp11_v2/src/libraries/core/BaseObject.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/BaseObject.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/BaseObject.cc	(revision 10821)
@@ -234,8 +234,8 @@
     {
         unsigned int i = 0;
-        for (std::set<Template*>::const_iterator it = this->templates_.begin(); it != this->templates_.end(); ++it)
+        for (const auto & elem : this->templates_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             i++;
         }
@@ -269,11 +269,11 @@
     {
         unsigned int i = 0;
-        for (std::map<BaseObject*, std::string>::const_iterator it = this->eventSources_.begin(); it != this->eventSources_.end(); ++it)
-        {
-            if (it->second != state)
+        for (const auto & elem : this->eventSources_)
+        {
+            if (elem.second != state)
                 continue;
 
             if (i == index)
-                return it->first;
+                return elem.first;
             ++i;
         }
@@ -296,8 +296,8 @@
     {
         unsigned int i = 0;
-        for (std::set<BaseObject*>::const_iterator it = this->eventListenersXML_.begin(); it != this->eventListenersXML_.end(); ++it)
+        for (const auto & elem : this->eventListenersXML_)
         {
             if (i == index)
-                return *it;
+                return elem;
             ++i;
         }
@@ -358,8 +358,8 @@
         Event event(activate, originator, name);
 
-        for (std::set<BaseObject*>::iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); ++it)
-        {
-            event.statename_ = (*it)->eventSources_[this];
-            (*it)->processEvent(event);
+        for (const auto & elem : this->eventListeners_)
+        {
+            event.statename_ = (elem)->eventSources_[this];
+            (elem)->processEvent(event);
         }
     }
@@ -370,6 +370,6 @@
     void BaseObject::fireEvent(Event& event)
     {
-        for (std::set<BaseObject*>::iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); ++it)
-            (*it)->processEvent(event);
+        for (const auto & elem : this->eventListeners_)
+            (elem)->processEvent(event);
     }
 
@@ -474,7 +474,7 @@
 
             // iterate through all states and get the event sources
-            for (std::list<std::string>::iterator it = eventnames.begin(); it != eventnames.end(); ++it)
+            for (auto & statename : eventnames)
             {
-                const std::string& statename = (*it);
+                
 
                 // if the event state is already known, continue with the next state
Index: /code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.cc	(revision 10821)
@@ -293,8 +293,8 @@
         {
             // No it's not: Search for classes inheriting from the given class and add the rules for them
-            for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildren().begin(); it != subclass->getDirectChildren().end(); ++it)
-                if ((*it)->isA(this->root_->getClass()))
-                    if (overwrite || (!this->nodeExists(*it))) // If we don't want to overwrite, only add nodes that don't already exist
-                        this->add(this->root_, *it, bInclude, overwrite);
+            for (const auto & elem : subclass->getDirectChildren())
+                if ((elem)->isA(this->root_->getClass()))
+                    if (overwrite || (!this->nodeExists(elem))) // If we don't want to overwrite, only add nodes that don't already exist
+                        this->add(this->root_, elem, bInclude, overwrite);
         }
 
@@ -325,10 +325,10 @@
         {
             // Search for an already existing node, containing the subclass we want to add
-            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it)
+            for (auto & elem : node->subnodes_)
             {
-                if (subclass->isA((*it)->getClass()))
+                if (subclass->isA((elem)->getClass()))
                 {
                     // We've found an existing node -> delegate the work with a recursive function-call and return
-                    this->add(*it, subclass, bInclude, overwrite);
+                    this->add(elem, subclass, bInclude, overwrite);
                     return;
                 }
@@ -392,6 +392,6 @@
         if (!subclass)
             return;
-        for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildren().begin(); it != subclass->getDirectChildren().end(); ++it)
-            this->add(*it, this->isIncluded(*it), false, false);
+        for (const auto & elem : subclass->getDirectChildren())
+            this->add(elem, this->isIncluded(elem), false, false);
 
         this->add(subclass, bInclude, false, clean);
@@ -435,7 +435,7 @@
 
             // Go through the list of subnodes and look for a node containing the searched subclass and delegate the request by a recursive function-call.
-            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it)
-                if (subclass->isA((*it)->getClass()))
-                    return isIncluded(*it, subclass);
+            for (auto & elem : node->subnodes_)
+                if (subclass->isA((elem)->getClass()))
+                    return isIncluded(elem, subclass);
 
             // There is no subnode containing our class -> the rule of the current node takes in effect
@@ -957,6 +957,6 @@
             // The bool is "false", meaning they have no subnodes and therefore need no further checks
             if (node->isIncluded())
-                for (std::set<const Identifier*>::iterator it = directChildren.begin(); it != directChildren.end(); ++it)
-                    this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(*it, false));
+                for (const auto & elem : directChildren)
+                    this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(elem, false));
         }
     }
Index: /code/branches/cpp11_v2/src/libraries/core/Core.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/Core.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/Core.cc	(revision 10821)
@@ -279,7 +279,7 @@
 
         const std::vector<std::string>& modulePaths = ApplicationPaths::getInstance().getModulePaths();
-        for (std::vector<std::string>::const_iterator it = modulePaths.begin(); it != modulePaths.end(); ++it)
-        {
-            ModuleInstance* module = new ModuleInstance(*it);
+        for (const auto & modulePath : modulePaths)
+        {
+            ModuleInstance* module = new ModuleInstance(modulePath);
             this->loadModule(module);
             this->modules_.push_back(module);
@@ -309,7 +309,7 @@
     void Core::unloadModules()
     {
-        for (std::list<ModuleInstance*>::iterator it = this->modules_.begin(); it != this->modules_.end(); ++it)
-        {
-            ModuleInstance* module = (*it);
+        for (auto module : this->modules_)
+        {
+            
             this->unloadModule(module);
             delete module;
Index: /code/branches/cpp11_v2/src/libraries/core/CoreStaticInitializationHandler.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/CoreStaticInitializationHandler.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/CoreStaticInitializationHandler.cc	(revision 10821)
@@ -99,6 +99,6 @@
         std::set<Identifier*> identifiers;
         const std::set<StaticallyInitializedInstance*>& instances = module->getInstances(StaticInitialization::IDENTIFIER);
-        for (std::set<StaticallyInitializedInstance*>::const_iterator it = instances.begin(); it != instances.end(); ++it)
-            identifiers.insert(&static_cast<StaticallyInitializedIdentifier*>(*it)->getIdentifier());
+        for (const auto & instance : instances)
+            identifiers.insert(&static_cast<StaticallyInitializedIdentifier*>(instance)->getIdentifier());
 
         // destroy objects. some objects may survive this at first because they still have strong pointers pointing at them. this is
@@ -106,16 +106,16 @@
         // that objects within one module may reference each other by strong pointers. but it is not allowed that objects from another
         // module (which is not unloaded) uses strong pointers to point at objects inside the unloaded module. this will lead to a crash.
-        for (std::set<Identifier*>::iterator it = identifiers.begin(); it != identifiers.end(); ++it)
-            (*it)->destroyObjects();
+        for (const auto & identifier : identifiers)
+            (identifier)->destroyObjects();
 
         // check if all objects were really destroyed. this is not the case if an object is referenced by a strong pointer from another
         // module (or if two objects inside this module reference each other). this will lead to a crash and must be fixed (e.g. by
         // changing object dependencies; or by changing the logic that allows modules to be unloaded).
-        for (std::set<Identifier*>::iterator it = identifiers.begin(); it != identifiers.end(); ++it)
+        for (const auto & identifier : identifiers)
         {
-            ObjectListBase* objectList = Context::getRootContext()->getObjectList(*it);
+            ObjectListBase* objectList = Context::getRootContext()->getObjectList(identifier);
             if (objectList->size() > 0)
             {
-                orxout(internal_error) << "There are still " << objectList->size() << " objects of type " << (*it)->getName()
+                orxout(internal_error) << "There are still " << objectList->size() << " objects of type " << (identifier)->getName()
                     << " after unloading the Identifier. This may lead to a crash" << endl;
             }
@@ -123,12 +123,12 @@
 
         // destroy object-lists in all contexts
-        for (std::set<Identifier*>::iterator it_identifier = identifiers.begin(); it_identifier != identifiers.end(); ++it_identifier)
+        for (const auto & identifier : identifiers)
         {
             // only do this if the Identifier is not a Context itself; otherwise we delete the list we're iterating over
-            if (!(*it_identifier)->isExactlyA(Class(Context)))
+            if (!(identifier)->isExactlyA(Class(Context)))
             {
                 // iterate over all contexts
                 for (ObjectList<Context>::iterator it_context = ObjectList<Context>::begin(); it_context != ObjectList<Context>::end(); ++it_context)
-                    it_context->destroyObjectList((*it_identifier));
+                    it_context->destroyObjectList((identifier));
             }
         }
Index: /code/branches/cpp11_v2/src/libraries/core/Game.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/Game.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/Game.cc	(revision 10821)
@@ -612,6 +612,6 @@
         // Check if graphics is still required
         bool graphicsRequired = false;
-        for (unsigned i = 0; i < loadedStates_.size(); ++i)
-            graphicsRequired |= loadedStates_[i]->getInfo().bGraphicsMode;
+        for (auto & elem : loadedStates_)
+            graphicsRequired |= elem->getInfo().bGraphicsMode;
         if (!graphicsRequired)
             this->unloadGraphics(!this->bAbort_); // if abort is false, that means the game is still running while unloading graphics. in this case we load a graphics manager without renderer (to keep all necessary ogre instances alive)
Index: /code/branches/cpp11_v2/src/libraries/core/Language.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/Language.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/Language.cc	(revision 10821)
@@ -107,6 +107,6 @@
     Language::~Language()
     {
-        for (std::map<std::string, LanguageEntry*>::iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it)
-            delete (it->second);
+        for (auto & elem : this->languageEntries_)
+            delete (elem.second);
     }
 
@@ -319,7 +319,7 @@
 
         // Iterate through the list an write the lines into the file
-        for (std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it)
-        {
-            file << it->second->getLabel() << '=' << it->second->getDefault() << endl;
+        for (const auto & elem : this->languageEntries_)
+        {
+            file << elem.second->getLabel() << '=' << elem.second->getDefault() << endl;
         }
 
Index: /code/branches/cpp11_v2/src/libraries/core/Loader.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/Loader.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/Loader.cc	(revision 10821)
@@ -165,7 +165,7 @@
                         std::ostringstream message;
                         message << "Possible sources of error:" << endl;
-                        for (std::vector<std::pair<std::string, size_t>>::iterator it = linesources.begin(); it != linesources.end(); ++it)
+                        for (auto & linesource : linesources)
                         {
-                            message << it->first << ", Line " << it->second << endl;
+                            message << linesource.first << ", Line " << linesource.second << endl;
                         }
                         orxout(user_error, context::loader) << message.str() << endl;
@@ -261,7 +261,7 @@
         {
             bool expectedValue = true;
-            for (std::map<size_t, bool>::iterator it = luaTags.begin(); it != luaTags.end(); ++it)
-            {
-                if (it->second == expectedValue)
+            for (auto & luaTag : luaTags)
+            {
+                if (luaTag.second == expectedValue)
                     expectedValue = !expectedValue;
                 else
Index: /code/branches/cpp11_v2/src/libraries/core/LuaState.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/LuaState.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/LuaState.cc	(revision 10821)
@@ -326,7 +326,7 @@
     /*static*/ bool LuaState::addToluaInterface(int (*function)(lua_State*), const std::string& name)
     {
-        for (ToluaInterfaceMap::const_iterator it = getToluaInterfaces().begin(); it != getToluaInterfaces().end(); ++it)
-        {
-            if (it->first == name || it->second == function)
+        for (const auto & interface : getToluaInterfaces())
+        {
+            if (interface.first == name || interface.second == function)
             {
                 orxout(internal_warning, context::lua) << "Trying to add a Tolua interface with the same name or function." << endl;
@@ -337,6 +337,6 @@
 
         // Open interface in all LuaStates
-        for (std::vector<LuaState*>::const_iterator it = getInstances().begin(); it != getInstances().end(); ++it)
-            (*function)((*it)->luaState_);
+        for (const auto & state : getInstances())
+            (*function)(state->luaState_);
 
         // Return dummy bool
@@ -354,8 +354,8 @@
 
         // Close interface in all LuaStates
-        for (std::vector<LuaState*>::const_iterator itState = getInstances().begin(); itState != getInstances().end(); ++itState)
-        {
-            lua_pushnil((*itState)->luaState_);
-            lua_setglobal((*itState)->luaState_, it->first.c_str());
+        for (const auto & state : getInstances())
+        {
+            lua_pushnil(state->luaState_);
+            lua_setglobal(state->luaState_, it->first.c_str());
         }
 
@@ -369,14 +369,14 @@
     /*static*/ void LuaState::openToluaInterfaces(lua_State* state)
     {
-        for (ToluaInterfaceMap::const_iterator it = getToluaInterfaces().begin(); it != getToluaInterfaces().end(); ++it)
-            (*it->second)(state);
+        for (const auto & interface : getToluaInterfaces())
+            (interface.second)(state);
     }
 
     /*static*/ void LuaState::closeToluaInterfaces(lua_State* state)
     {
-        for (ToluaInterfaceMap::const_iterator it = getToluaInterfaces().begin(); it != getToluaInterfaces().end(); ++it)
+        for (const auto & interface : getToluaInterfaces())
         {
             lua_pushnil(state);
-            lua_setglobal(state, it->first.c_str());
+            lua_setglobal(state, interface.first.c_str());
         }
     }
Index: /code/branches/cpp11_v2/src/libraries/core/Namespace.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/Namespace.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/Namespace.cc	(revision 10821)
@@ -53,6 +53,6 @@
     {
         if (this->bRoot_)
-            for (std::set<NamespaceNode*>::iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); ++it)
-                delete (*it);
+            for (auto & elem : this->representingNamespaces_)
+                delete elem;
     }
 
@@ -80,7 +80,7 @@
             for (unsigned int i = 0; i < tokens.size(); i++)
             {
-                for (std::set<NamespaceNode*>::iterator it = this->getNamespace()->representingNamespaces_.begin(); it != this->getNamespace()->representingNamespaces_.end(); ++it)
+                for (auto & elem : this->getNamespace()->representingNamespaces_)
                 {
-                    std::set<NamespaceNode*> temp = (*it)->getNodeRelative(tokens[i]);
+                    std::set<NamespaceNode*> temp = elem->getNodeRelative(tokens[i]);
                     this->representingNamespaces_.insert(temp.begin(), temp.end());
                 }
@@ -93,8 +93,8 @@
         if (this->bAutogeneratedFileRootNamespace_)
         {
-            for (std::set<NamespaceNode*>::iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); ++it)
+            for (auto & elem : this->representingNamespaces_)
             {
-                (*it)->setRoot(true);
-                (*it)->setHidden(true);
+                elem->setRoot(true);
+                elem->setHidden(true);
             }
         }
@@ -114,9 +114,9 @@
     bool Namespace::includes(const Namespace* ns) const
     {
-        for (std::set<NamespaceNode*>::const_iterator it1 = this->representingNamespaces_.begin(); it1 != this->representingNamespaces_.end(); ++it1)
+        for (const auto & elem1 : this->representingNamespaces_)
         {
-            for (std::set<NamespaceNode*>::const_iterator it2 = ns->representingNamespaces_.begin(); it2 != ns->representingNamespaces_.end(); ++it2)
+            for (const auto & elem2 : ns->representingNamespaces_)
             {
-                if ((*it1)->includes(*it2))
+                if (elem1->includes(elem2))
                 {
                     if (this->operator_ == "or")
@@ -149,10 +149,11 @@
 
         int i = 0;
-        for (std::set<NamespaceNode*>::const_iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); i++, ++it)
+        for (const auto & elem : this->representingNamespaces_)
         {
             if (i > 0)
                 output += " / ";
 
-            output += (*it)->toString();
+            output += elem->toString();
+            i++;
         }
 
@@ -165,10 +166,11 @@
 
         int i = 0;
-        for (std::set<NamespaceNode*>::const_iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); i++, ++it)
+        for (const auto & elem : this->representingNamespaces_)
         {
             if (i > 0)
                 output += '\n';
 
-            output += (*it)->toString(indentation);
+            output += elem->toString(indentation);
+            i++;
         }
 
Index: /code/branches/cpp11_v2/src/libraries/core/NamespaceNode.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/NamespaceNode.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/NamespaceNode.cc	(revision 10821)
@@ -103,9 +103,9 @@
                 bool bFoundMatchingNamespace = false;
 
-                for (std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
+                for (auto & elem : this->subnodes_)
                 {
-                    if (it->first.find(firstPart) == (it->first.size() - firstPart.size()))
+                    if (elem.first.find(firstPart) == (elem.first.size() - firstPart.size()))
                     {
-                        std::set<NamespaceNode*> temp2 = it->second->getNodeRelative(secondPart);
+                        std::set<NamespaceNode*> temp2 = elem.second->getNodeRelative(secondPart);
                         nodes.insert(temp2.begin(), temp2.end());
                         bFoundMatchingNamespace = true;
@@ -132,6 +132,6 @@
         else
         {
-            for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
-                if (it->second->includes(ns))
+            for (const auto & elem : this->subnodes_)
+                if (elem.second->includes(ns))
                     return true;
         }
@@ -167,6 +167,6 @@
         std::string output = (indentation + this->name_ + '\n');
 
-        for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
-            output += it->second->toString(indentation + "  ");
+        for (const auto & elem : this->subnodes_)
+            output += elem.second->toString(indentation + "  ");
 
         return output;
Index: /code/branches/cpp11_v2/src/libraries/core/Resource.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/Resource.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/Resource.cc	(revision 10821)
@@ -58,7 +58,7 @@
         DataStreamListPtr resources(new Ogre::DataStreamList());
         const Ogre::StringVector& groups = Ogre::ResourceGroupManager::getSingleton().getResourceGroups();
-        for (Ogre::StringVector::const_iterator it = groups.begin(); it != groups.end(); ++it)
+        for (const auto & group : groups)
         {
-            DataStreamListPtr temp = Ogre::ResourceGroupManager::getSingleton().openResources(pattern, *it);
+            DataStreamListPtr temp = Ogre::ResourceGroupManager::getSingleton().openResources(pattern, group);
             resources->insert(resources->end(), temp->begin(), temp->end());
         }
@@ -121,7 +121,7 @@
         StringVectorPtr resourceNames(new Ogre::StringVector());
         const Ogre::StringVector& groups = Ogre::ResourceGroupManager::getSingleton().getResourceGroups();
-        for (Ogre::StringVector::const_iterator it = groups.begin(); it != groups.end(); ++it)
+        for (const auto & group : groups)
         {
-            StringVectorPtr temp = Ogre::ResourceGroupManager::getSingleton().findResourceNames(*it, pattern);
+            StringVectorPtr temp = Ogre::ResourceGroupManager::getSingleton().findResourceNames(group, pattern);
             resourceNames->insert(resourceNames->end(), temp->begin(), temp->end());
         }
Index: /code/branches/cpp11_v2/src/libraries/core/class/Identifier.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/class/Identifier.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/class/Identifier.cc	(revision 10821)
@@ -87,15 +87,15 @@
         for (std::list<const Identifier*>::const_iterator it = this->directParents_.begin(); it != this->directParents_.end(); ++it)
             const_cast<Identifier*>(*it)->directChildren_.erase(this);
-        for (std::set<const Identifier*>::const_iterator it = this->children_.begin(); it != this->children_.end(); ++it)
-            const_cast<Identifier*>(*it)->parents_.remove(this);
-        for (std::set<const Identifier*>::const_iterator it = this->directChildren_.begin(); it != this->directChildren_.end(); ++it)
-            const_cast<Identifier*>(*it)->directParents_.remove(this);
-
-        for (std::map<std::string, ConfigValueContainer*>::iterator it = this->configValues_.begin(); it != this->configValues_.end(); ++it)
-            delete (it->second);
-        for (std::map<std::string, XMLPortParamContainer*>::iterator it = this->xmlportParamContainers_.begin(); it != this->xmlportParamContainers_.end(); ++it)
-            delete (it->second);
-        for (std::map<std::string, XMLPortObjectContainer*>::iterator it = this->xmlportObjectContainers_.begin(); it != this->xmlportObjectContainers_.end(); ++it)
-            delete (it->second);
+        for (const auto & elem : this->children_)
+            const_cast<Identifier*>(elem)->parents_.remove(this);
+        for (const auto & elem : this->directChildren_)
+            const_cast<Identifier*>(elem)->directParents_.remove(this);
+
+        for (auto & elem : this->configValues_)
+            delete (elem.second);
+        for (auto & elem : this->xmlportParamContainers_)
+            delete (elem.second);
+        for (auto & elem : this->xmlportObjectContainers_)
+            delete (elem.second);
     }
 
@@ -157,7 +157,7 @@
         if (this->directParents_.empty())
         {
-            for (std::list<const Identifier*>::const_iterator it = initializationTrace.begin(); it != initializationTrace.end(); ++it)
-                if (*it != this)
-                    this->parents_.push_back(*it);
+            for (const auto & elem : initializationTrace)
+                if (elem != this)
+                    this->parents_.push_back(elem);
         }
         else
@@ -261,20 +261,20 @@
 
         // if any parent class is virtual, it will be instantiated first, so we need to add them first.
-        for (std::list<const Identifier*>::const_iterator it_parent = this->parents_.begin(); it_parent != this->parents_.end(); ++it_parent)
-        {
-            if ((*it_parent)->isVirtualBase())
+        for (const auto & elem : this->parents_)
+        {
+            if ((elem)->isVirtualBase())
             {
-                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)
+                for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(elem)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(elem)->parents_.end(); ++it_parent_parent)
                     this->addIfNotExists(expectedIdentifierTrace, *it_parent_parent);
-                this->addIfNotExists(expectedIdentifierTrace, *it_parent);
+                this->addIfNotExists(expectedIdentifierTrace, elem);
             }
         }
 
         // now all direct parents get created recursively. already added identifiers (e.g. virtual base classes) are not added again.
-        for (std::list<const Identifier*>::const_iterator it_parent = this->directParents_.begin(); it_parent != this->directParents_.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)
+        for (const auto & elem : this->directParents_)
+        {
+            for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(elem)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(elem)->parents_.end(); ++it_parent_parent)
                 this->addIfNotExists(expectedIdentifierTrace, *it_parent_parent);
-            this->addIfNotExists(expectedIdentifierTrace, *it_parent);
+            this->addIfNotExists(expectedIdentifierTrace, elem);
         }
 
@@ -285,6 +285,6 @@
 
             orxout(internal_warning) << "  Actual trace (after creating a sample instance):" << endl << "    ";
-            for (std::list<const Identifier*>::const_iterator it_parent = this->parents_.begin(); it_parent != this->parents_.end(); ++it_parent)
-                orxout(internal_warning) << " " << (*it_parent)->getName();
+            for (const auto & elem : this->parents_)
+                orxout(internal_warning) << " " << (elem)->getName();
             orxout(internal_warning) << endl;
 
@@ -295,6 +295,6 @@
 
             orxout(internal_warning) << "  Direct parents (according to class hierarchy definitions):" << endl << "    ";
-            for (std::list<const Identifier*>::const_iterator it_parent = this->directParents_.begin(); it_parent != this->directParents_.end(); ++it_parent)
-                orxout(internal_warning) << " " << (*it_parent)->getName();
+            for (const auto & elem : this->directParents_)
+                orxout(internal_warning) << " " << (elem)->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 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/class/Identifier.h	(revision 10821)
@@ -462,6 +462,6 @@
 
         if (updateChildren)
-            for (std::set<const Identifier*>::const_iterator it = this->getChildren().begin(); it != this->getChildren().end(); ++it)
-                (*it)->updateConfigValues(false);
+            for (const auto & elem : this->getChildren())
+                (elem)->updateConfigValues(false);
     }
 
Index: /code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc	(revision 10821)
@@ -93,7 +93,7 @@
         {
             Context temporaryContext(nullptr);
-            for (std::set<Identifier*>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
+            for (auto identifier : this->identifiers_)
             {
-                Identifier* identifier = (*it);
+                
                 if (identifier->isInitialized())
                     continue;
@@ -127,6 +127,6 @@
 
         // finish the initialization of all identifiers
-        for (std::set<Identifier*>::const_iterator it = initializedIdentifiers.begin(); it != initializedIdentifiers.end(); ++it)
-            (*it)->finishInitialization();
+        for (const auto & initializedIdentifier : initializedIdentifiers)
+            (initializedIdentifier)->finishInitialization();
 
         // only check class hierarchy in dev mode because it's an expensive operation and it requires a developer to fix detected problems anyway.
@@ -144,26 +144,26 @@
     {
         // check if there are any uninitialized identifiers remaining
-        for (std::set<Identifier*>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
-            if (!(*it)->isInitialized())
-                orxout(internal_error) << "Identifier was registered late and is not initialized: " << (*it)->getName() << " / " << (*it)->getTypeInfo().name() << endl;
+        for (const auto & elem : this->identifiers_)
+            if (!(elem)->isInitialized())
+                orxout(internal_error) << "Identifier was registered late and is not initialized: " << (elem)->getName() << " / " << (elem)->getTypeInfo().name() << endl;
 
         // for all initialized identifiers, check if a sample instance behaves as expected according to the class hierarchy
         Context temporaryContext(nullptr);
-        for (std::set<Identifier*>::const_iterator it1 = initializedIdentifiers.begin(); it1 != initializedIdentifiers.end(); ++it1)
+        for (const auto & initializedIdentifier : initializedIdentifiers)
         {
-            if (!(*it1)->hasFactory())
+            if (!(initializedIdentifier)->hasFactory())
                 continue;
 
-            Identifiable* temp = (*it1)->fabricate(&temporaryContext);
-
-            for (std::set<Identifier*>::const_iterator it2 = this->identifiers_.begin(); it2 != this->identifiers_.end(); ++it2)
+            Identifiable* temp = (initializedIdentifier)->fabricate(&temporaryContext);
+
+            for (const auto & elem : this->identifiers_)
             {
-                bool isA_AccordingToRtti = (*it2)->canDynamicCastObjectToIdentifierClass(temp);
-                bool isA_AccordingToClassHierarchy = temp->isA((*it2));
+                bool isA_AccordingToRtti = (elem)->canDynamicCastObjectToIdentifierClass(temp);
+                bool isA_AccordingToClassHierarchy = temp->isA((elem));
 
                 if (isA_AccordingToRtti != isA_AccordingToClassHierarchy)
                 {
-                    orxout(internal_error) << "Class hierarchy does not match RTTI: Class hierarchy claims that " << (*it1)->getName() <<
-                        (isA_AccordingToClassHierarchy ? " is a " : " is not a ") << (*it2)->getName() << " but RTTI says the opposite." << endl;
+                    orxout(internal_error) << "Class hierarchy does not match RTTI: Class hierarchy claims that " << (initializedIdentifier)->getName() <<
+                        (isA_AccordingToClassHierarchy ? " is a " : " is not a ") << (elem)->getName() << " but RTTI says the opposite." << endl;
                 }
             }
@@ -184,6 +184,6 @@
     {
         orxout(internal_status) << "Destroy class-hierarchy" << endl;
-        for (std::set<Identifier*>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
-            (*it)->reset();
+        for (const auto & elem : this->identifiers_)
+            (elem)->reset();
     }
 
@@ -260,7 +260,7 @@
     {
         // TODO: use std::type_index and a map to find identifiers by type_info (only with c++11)
-        for (std::set<Identifier*>::iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
-            if ((*it)->getTypeInfo() == typeInfo)
-                return (*it);
+        for (const auto & elem : this->identifiers_)
+            if ((elem)->getTypeInfo() == typeInfo)
+                return (elem);
         return nullptr;
     }
Index: /code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 10821)
@@ -77,6 +77,6 @@
             bool groupIsVisible(const std::map<std::string, ConsoleCommand*>& group, bool bOnlyShowHidden)
             {
-                for (std::map<std::string, ConsoleCommand*>::const_iterator it_command = group.begin(); it_command != group.end(); ++it_command)
-                    if (it_command->second->isActive() && it_command->second->hasAccess() && (!it_command->second->isHidden())^bOnlyShowHidden)
+                for (const auto & elem : group)
+                    if (elem.second->isActive() && elem.second->hasAccess() && (!elem.second->isHidden())^bOnlyShowHidden)
                         return true;
 
@@ -100,7 +100,7 @@
                 // get all the groups that are visible (except the shortcut group "")
                 const std::map<std::string, std::map<std::string, ConsoleCommand*>>& commands = ConsoleCommandManager::getInstance().getCommands();
-                for (std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = commands.begin(); it_group != commands.end(); ++it_group)
-                    if (groupIsVisible(it_group->second, bOnlyShowHidden) && it_group->first != "" && (fragmentLC == "" || getLowercase(it_group->first).find(fragmentLC) == 0))
-                        groupList.push_back(ArgumentCompletionListElement(it_group->first, getLowercase(it_group->first)));
+                for (const auto & command : commands)
+                    if (groupIsVisible(command.second, bOnlyShowHidden) && command.first != "" && (fragmentLC == "" || getLowercase(command.first).find(fragmentLC) == 0))
+                        groupList.push_back(ArgumentCompletionListElement(command.first, getLowercase(command.first)));
 
                 // now add all shortcuts (in group "")
@@ -113,7 +113,7 @@
 
                     // add the shortcuts
-                    for (std::map<std::string, ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
-                        if (it_command->second->isActive() && it_command->second->hasAccess() && (!it_command->second->isHidden())^bOnlyShowHidden && (fragmentLC == "" || getLowercase(it_command->first).find(fragmentLC) == 0))
-                            groupList.push_back(ArgumentCompletionListElement(it_command->first, getLowercase(it_command->first)));
+                    for (const auto & elem : it_group->second)
+                        if (elem.second->isActive() && elem.second->hasAccess() && (!elem.second->isHidden())^bOnlyShowHidden && (fragmentLC == "" || getLowercase(elem.first).find(fragmentLC) == 0))
+                            groupList.push_back(ArgumentCompletionListElement(elem.first, getLowercase(elem.first)));
                 }
 
@@ -146,7 +146,7 @@
                 if (it_group != ConsoleCommandManager::getInstance().getCommands().end())
                 {
-                    for (std::map<std::string, ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
-                        if (it_command->second->isActive() && it_command->second->hasAccess() && (!it_command->second->isHidden())^bOnlyShowHidden)
-                            commandList.push_back(ArgumentCompletionListElement(it_command->first, getLowercase(it_command->first)));
+                    for (const auto & elem : it_group->second)
+                        if (elem.second->isActive() && elem.second->hasAccess() && (!elem.second->isHidden())^bOnlyShowHidden)
+                            commandList.push_back(ArgumentCompletionListElement(elem.first, getLowercase(elem.first)));
                 }
 
@@ -281,6 +281,6 @@
 
             const std::set<std::string>& names = SettingsConfigFile::getInstance().getSectionNames();
-            for (std::set<std::string>::const_iterator it = names.begin(); it != names.end(); ++it)
-                sectionList.push_back(ArgumentCompletionListElement(*it, getLowercase(*it)));
+            for (const auto & name : names)
+                sectionList.push_back(ArgumentCompletionListElement(name, getLowercase(name)));
 
             return sectionList;
Index: /code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc	(revision 10821)
@@ -306,6 +306,6 @@
                 // the user typed 1-2 arguments, check what he tried to type and print a suitable error
                 std::string groupLC = getLowercase(this->getToken(0));
-                for (std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().begin(); it_group != ConsoleCommandManager::getInstance().getCommandsLC().end(); ++it_group)
-                    if (it_group->first == groupLC)
+                for (const auto & elem : ConsoleCommandManager::getInstance().getCommandsLC())
+                    if (elem.first == groupLC)
                         return std::string("Error: There is no command in group \"") + this->getToken(0) + "\" starting with \"" + this->getToken(1) + "\".";
 
@@ -328,11 +328,11 @@
 
         // iterate through all groups and their commands and calculate the distance to the current command. keep the best.
-        for (std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().begin(); it_group != ConsoleCommandManager::getInstance().getCommandsLC().end(); ++it_group)
-        {
-            if (it_group->first != "")
-            {
-                for (std::map<std::string, ConsoleCommand*>::const_iterator it_name = it_group->second.begin(); it_name != it_group->second.end(); ++it_name)
-                {
-                    std::string command = it_group->first + " " + it_name->first;
+        for (const auto & elem : ConsoleCommandManager::getInstance().getCommandsLC())
+        {
+            if (elem.first != "")
+            {
+                for (std::map<std::string, ConsoleCommand*>::const_iterator it_name = elem.second.begin(); it_name != elem.second.end(); ++it_name)
+                {
+                    std::string command = elem.first + " " + it_name->first;
                     unsigned int distance = getLevenshteinDistance(command, token0_LC + " " + token1_LC);
                     if (distance < nearestDistance)
@@ -349,7 +349,7 @@
         if (it_group !=  ConsoleCommandManager::getInstance().getCommandsLC().end())
         {
-            for (std::map<std::string, ConsoleCommand*>::const_iterator it_name = it_group->second.begin(); it_name != it_group->second.end(); ++it_name)
-            {
-                std::string command = it_name->first;
+            for (const auto & elem : it_group->second)
+            {
+                std::string command = elem.first;
                 unsigned int distance = getLevenshteinDistance(command, token0_LC);
                 if (distance < nearestDistance)
@@ -429,6 +429,6 @@
     {
         size_t count = 0;
-        for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
-            if (it->getComparable() != "")
+        for (const auto & elem : list)
+            if (elem.getComparable() != "")
                 ++count;
         return count;
@@ -495,13 +495,13 @@
         {
             // only one (non-empty) value in the list - search it and return it
-            for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
-            {
-                if (it->getComparable() != "")
+            for (const auto & elem : list)
+            {
+                if (elem.getComparable() != "")
                 {
                     // arguments that have a separate string to be displayed need a little more care - just return them without modification. add a space character to the others.
-                    if (it->hasDisplay())
-                        return (it->getString());
+                    if (elem.hasDisplay())
+                        return (elem.getString());
                     else
-                        return (it->getString() + ' ');
+                        return (elem.getString() + ' ');
                 }
             }
@@ -517,8 +517,8 @@
                 char tempComparable = '\0';
                 char temp = '\0';
-                for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
-                {
-                    const std::string& argumentComparable = it->getComparable();
-                    const std::string& argument = it->getString();
+                for (const auto & elem : list)
+                {
+                    const std::string& argumentComparable = elem.getComparable();
+                    const std::string& argument = elem.getString();
 
                     // ignore empty arguments
@@ -560,10 +560,10 @@
     {
         std::string output;
-        for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
-        {
-            output += it->getDisplay();
+        for (const auto & elem : list)
+        {
+            output += elem.getDisplay();
 
             // add a space character between two elements for all non-empty arguments
-            if (it->getComparable() != "")
+            if (elem.getComparable() != "")
                 output += ' ';
         }
Index: /code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc	(revision 10821)
@@ -75,6 +75,6 @@
         this->baseFunctor_ = executor->getFunctor();
 
-        for (size_t i = 0; i < MAX_FUNCTOR_ARGUMENTS; ++i)
-            this->argumentCompleter_[i] = nullptr;
+        for (auto & elem : this->argumentCompleter_)
+            elem = nullptr;
 
         this->keybindMode_ = KeybindMode::OnPress;
Index: /code/branches/cpp11_v2/src/libraries/core/command/Shell.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/command/Shell.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/command/Shell.cc	(revision 10821)
@@ -258,6 +258,6 @@
         vectorize(text, '\n', &lines);
 
-        for (size_t i = 0; i < lines.size(); ++i)
-            this->addLine(lines[i], type);
+        for (auto & line : lines)
+            this->addLine(line, type);
     }
 
Index: /code/branches/cpp11_v2/src/libraries/core/command/TclThreadList.h
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/command/TclThreadList.h	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/command/TclThreadList.h	(revision 10821)
@@ -262,6 +262,6 @@
         boost::shared_lock<boost::shared_mutex> lock(this->mutex_);
 
-        for (typename std::list<T>::const_iterator it = this->list_.begin(); it != this->list_.end(); ++it)
-            if (*it == value)
+        for (const auto & elem : this->list_)
+            if (elem == value)
                 return true;
 
Index: /code/branches/cpp11_v2/src/libraries/core/command/TclThreadManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/command/TclThreadManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/command/TclThreadManager.cc	(revision 10821)
@@ -551,7 +551,7 @@
 
         std::list<unsigned int> threads;
-        for (std::map<unsigned int, TclInterpreterBundle*>::const_iterator it = this->interpreterBundles_.begin(); it != this->interpreterBundles_.end(); ++it)
-            if (it->first > 0 && it->first <= this->numInterpreterBundles_) // only list autonumbered interpreters (created with create()) - exclude the default interpreter 0 and all manually numbered interpreters)
-                threads.push_back(it->first);
+        for (const auto & elem : this->interpreterBundles_)
+            if (elem.first > 0 && elem.first <= this->numInterpreterBundles_) // only list autonumbered interpreters (created with create()) - exclude the default interpreter 0 and all manually numbered interpreters)
+                threads.push_back(elem.first);
         return threads;
     }
Index: /code/branches/cpp11_v2/src/libraries/core/commandline/CommandLineParser.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/commandline/CommandLineParser.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/commandline/CommandLineParser.cc	(revision 10821)
@@ -124,21 +124,21 @@
             std::string shortcut;
             std::string value;
-            for (unsigned int i = 0; i < arguments.size(); ++i)
-            {
-                if (arguments[i].size() != 0)
+            for (auto & argument : arguments)
+            {
+                if (argument.size() != 0)
                 {
                     // sure not ""
-                    if (arguments[i][0] == '-')
+                    if (argument[0] == '-')
                     {
                         // start with "-"
-                        if (arguments[i].size() == 1)
+                        if (argument.size() == 1)
                         {
                             // argument[i] is "-", probably a minus sign
                             value += "- ";
                         }
-                        else if (arguments[i][1] <= 57 && arguments[i][1] >= 48)
+                        else if (argument[1] <= 57 && argument[1] >= 48)
                         {
                             // negative number as a value
-                            value += arguments[i] + ' ';
+                            value += argument + ' ';
                         }
                         else
@@ -161,13 +161,13 @@
                             }
 
-                            if (arguments[i][1] == '-')
+                            if (argument[1] == '-')
                             {
                                 // full name argument with "--name"
-                                name = arguments[i].substr(2);
+                                name = argument.substr(2);
                             }
                             else
                             {
                                 // shortcut with "-s"
-                                shortcut = arguments[i].substr(1);
+                                shortcut = argument.substr(1);
                             }
 
@@ -186,5 +186,5 @@
 
                         // Concatenate strings as long as there's no new argument by "-" or "--"
-                        value += arguments[i] + ' ';
+                        value += argument + ' ';
                     }
                 }
Index: /code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc	(revision 10821)
@@ -234,9 +234,9 @@
         }
 
-        for (std::list<ConfigFileSection*>::const_iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-        {
-            file << (*it)->getFileEntry() << endl;
-
-            for (std::list<ConfigFileEntry*>::const_iterator it_entries = (*it)->getEntriesBegin(); it_entries != (*it)->getEntriesEnd(); ++it_entries)
+        for (const auto & elem : this->sections_)
+        {
+            file << (elem)->getFileEntry() << endl;
+
+            for (std::list<ConfigFileEntry*>::const_iterator it_entries = (elem)->getEntriesBegin(); it_entries != (elem)->getEntriesEnd(); ++it_entries)
                 file << (*it_entries)->getFileEntry() << endl;
 
@@ -280,7 +280,7 @@
     ConfigFileSection* ConfigFile::getSection(const std::string& section) const
     {
-        for (std::list<ConfigFileSection*>::const_iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-            if ((*it)->getName() == section)
-                return (*it);
+        for (const auto & elem : this->sections_)
+            if ((elem)->getName() == section)
+                return (elem);
         return nullptr;
     }
@@ -291,7 +291,7 @@
     ConfigFileSection* ConfigFile::getOrCreateSection(const std::string& section)
     {
-        for (std::list<ConfigFileSection*>::iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-            if ((*it)->getName() == section)
-                return (*it);
+        for (auto & elem : this->sections_)
+            if ((elem)->getName() == section)
+                return (elem);
 
         this->bUpdated_ = true;
@@ -307,10 +307,10 @@
         bool sectionsUpdated = false;
 
-        for (std::list<ConfigFileSection*>::iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-        {
-            if ((*it)->bUpdated_)
+        for (auto & elem : this->sections_)
+        {
+            if ((elem)->bUpdated_)
             {
                 sectionsUpdated = true;
-                (*it)->bUpdated_ = false;
+                (elem)->bUpdated_ = false;
             }
         }
Index: /code/branches/cpp11_v2/src/libraries/core/config/ConfigFileManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/config/ConfigFileManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/config/ConfigFileManager.cc	(revision 10821)
@@ -53,7 +53,7 @@
     ConfigFileManager::~ConfigFileManager()
     {
-        for (std::array<ConfigFile*, 3>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); ++it)
-            if (*it)
-                delete (*it);
+        for (const auto & elem : this->configFiles_)
+            if (elem)
+                delete (elem);
     }
 
Index: /code/branches/cpp11_v2/src/libraries/core/config/ConfigFileSection.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/config/ConfigFileSection.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/config/ConfigFileSection.cc	(revision 10821)
@@ -80,8 +80,8 @@
     {
         unsigned int size = 0;
-        for (std::list<ConfigFileEntry*>::const_iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
-            if ((*it)->getName() == name)
-                if ((*it)->getIndex() >= size)
-                    size = (*it)->getIndex() + 1;
+        for (const auto & elem : this->entries_)
+            if ((elem)->getName() == name)
+                if ((elem)->getIndex() >= size)
+                    size = (elem)->getIndex() + 1;
         return size;
     }
@@ -105,8 +105,8 @@
     ConfigFileEntry* ConfigFileSection::getEntry(const std::string& name) const
     {
-        for (std::list<ConfigFileEntry*>::const_iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
+        for (const auto & elem : this->entries_)
         {
-            if ((*it)->getName() == name)
-                return *it;
+            if ((elem)->getName() == name)
+                return elem;
         }
         return nullptr;
@@ -121,8 +121,8 @@
     ConfigFileEntry* ConfigFileSection::getEntry(const std::string& name, unsigned int index) const
     {
-        for (std::list<ConfigFileEntry*>::const_iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
+        for (const auto & elem : this->entries_)
         {
-            if (((*it)->getName() == name) && ((*it)->getIndex() == index))
-                return *it;
+            if (((elem)->getName() == name) && ((elem)->getIndex() == index))
+                return elem;
         }
         return nullptr;
Index: /code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.h
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.h	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.h	(revision 10821)
@@ -130,6 +130,6 @@
 
                 this->value_ = V();
-                for (unsigned int i = 0; i < defvalue.size(); i++)
-                    this->valueVector_.push_back(MultiType(defvalue[i]));
+                for (auto & elem : defvalue)
+                    this->valueVector_.push_back(MultiType(elem));
 
                 this->initVector();
@@ -183,6 +183,6 @@
                     std::vector<T> temp = *value;
                     value->clear();
-                    for (unsigned int i = 0; i < this->valueVector_.size(); ++i)
-                        value->push_back(this->valueVector_[i]);
+                    for (auto & elem : this->valueVector_)
+                        value->push_back(elem);
 
                     if (value->size() != temp.size())
@@ -211,6 +211,6 @@
                 {
                     value->clear();
-                    for (unsigned int i = 0; i < this->valueVector_.size(); ++i)
-                        value->push_back(this->valueVector_[i]);
+                    for (auto & elem : this->valueVector_)
+                        value->push_back(elem);
                 }
                 return *this;
Index: /code/branches/cpp11_v2/src/libraries/core/input/Button.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/input/Button.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/input/Button.cc	(revision 10821)
@@ -196,11 +196,11 @@
 
                     // add command to the buffer if not yet existing
-                    for (unsigned int iParamCmd = 0; iParamCmd < paramCommandBuffer_->size(); iParamCmd++)
-                    {
-                        if ((*paramCommandBuffer_)[iParamCmd]->evaluation_.getConsoleCommand()
+                    for (auto & elem : *paramCommandBuffer_)
+                    {
+                        if (elem->evaluation_.getConsoleCommand()
                             == eval.getConsoleCommand())
                         {
                             // already in list
-                            cmd->paramCommand_ = (*paramCommandBuffer_)[iParamCmd];
+                            cmd->paramCommand_ = elem;
                             break;
                         }
Index: /code/branches/cpp11_v2/src/libraries/core/input/InputBuffer.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/input/InputBuffer.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/input/InputBuffer.cc	(revision 10821)
@@ -110,10 +110,10 @@
     void InputBuffer::insert(const std::string& input, bool update)
     {
-        for (unsigned int i = 0; i < input.size(); ++i)
-        {
-            this->insert(input[i], false);
+        for (auto & elem : input)
+        {
+            this->insert(elem, false);
 
             if (update)
-                this->updated(input[i], false);
+                this->updated(elem, false);
         }
 
@@ -170,8 +170,8 @@
     void InputBuffer::updated()
     {
-        for (std::list<BaseInputBufferListenerTuple*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
-        {
-            if ((*it)->bListenToAllChanges_)
-                (*it)->callFunction();
+        for (auto & elem : this->listeners_)
+        {
+            if ((elem)->bListenToAllChanges_)
+                (elem)->callFunction();
         }
     }
@@ -179,8 +179,8 @@
     void InputBuffer::updated(const char& update, bool bSingleInput)
     {
-        for (std::list<BaseInputBufferListenerTuple*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
-        {
-            if ((!(*it)->trueKeyFalseChar_) && ((*it)->bListenToAllChanges_ || ((*it)->char_ == update)) && (!(*it)->bOnlySingleInput_ || bSingleInput))
-                (*it)->callFunction();
+        for (auto & elem : this->listeners_)
+        {
+            if ((!(elem)->trueKeyFalseChar_) && ((elem)->bListenToAllChanges_ || ((elem)->char_ == update)) && (!(elem)->bOnlySingleInput_ || bSingleInput))
+                (elem)->callFunction();
         }
     }
@@ -201,8 +201,8 @@
             return;
 
-        for (std::list<BaseInputBufferListenerTuple*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
-        {
-            if ((*it)->trueKeyFalseChar_ && ((*it)->key_ == evt.getKeyCode()))
-                (*it)->callFunction();
+        for (auto & elem : this->listeners_)
+        {
+            if ((elem)->trueKeyFalseChar_ && ((elem)->key_ == evt.getKeyCode()))
+                (elem)->callFunction();
         }
 
Index: /code/branches/cpp11_v2/src/libraries/core/input/InputDevice.h
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/input/InputDevice.h	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/input/InputDevice.h	(revision 10821)
@@ -158,12 +158,12 @@
 
             // Call all the states with the held button event
-            for (unsigned int iB = 0; iB < pressedButtons_.size(); ++iB)
-                for (unsigned int iS = 0; iS < inputStates_.size(); ++iS)
-                    inputStates_[iS]->template buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>(
-                        this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(pressedButtons_[iB]));
+            for (auto & button : pressedButtons_)
+                for (auto & state : inputStates_)
+                    state->template buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>(
+                        this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
 
             // Call states with device update events
-            for (unsigned int i = 0; i < inputStates_.size(); ++i)
-                inputStates_[i]->update(time.getDeltaTime(), this->getDeviceID());
+            for (auto & elem : inputStates_)
+                elem->update(time.getDeltaTime(), this->getDeviceID());
 
             static_cast<DeviceClass*>(this)->updateImpl(time);
@@ -196,6 +196,6 @@
 
             // Call states
-            for (unsigned int i = 0; i < inputStates_.size(); ++i)
-                inputStates_[i]->template buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
+            for (auto & elem : inputStates_)
+                elem->template buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
         }
 
@@ -218,6 +218,6 @@
 
             // Call states
-            for (unsigned int i = 0; i < inputStates_.size(); ++i)
-                inputStates_[i]->template buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
+            for (auto & elem : inputStates_)
+                elem->template buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
         }
 
Index: /code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc	(revision 10821)
@@ -373,9 +373,9 @@
         // check whether a state has changed its EMPTY situation
         bool bUpdateRequired = false;
-        for (std::map<int, InputState*>::iterator it = activeStates_.begin(); it != activeStates_.end(); ++it)
-        {
-            if (it->second->hasExpired())
-            {
-                it->second->resetExpiration();
+        for (auto & elem : activeStates_)
+        {
+            if (elem.second->hasExpired())
+            {
+                elem.second->resetExpiration();
                 bUpdateRequired = true;
             }
@@ -391,6 +391,6 @@
 
         // Collect function calls for the update
-        for (unsigned int i = 0; i < activeStatesTicked_.size(); ++i)
-            activeStatesTicked_[i]->update(time.getDeltaTime());
+        for (auto & elem : activeStatesTicked_)
+            elem->update(time.getDeltaTime());
 
         // Execute all cached function calls in order
@@ -401,6 +401,6 @@
         // If we delay the calls, then OIS and and the InputStates are not anymore
         // in the call stack and can therefore be edited.
-        for (size_t i = 0; i < this->callBuffer_.size(); ++i)
-            this->callBuffer_[i]();
+        for (auto & elem : this->callBuffer_)
+            elem();
 
         this->callBuffer_.clear();
@@ -437,13 +437,13 @@
         // Using an std::set to avoid duplicates
         std::set<InputState*> tempSet;
-        for (unsigned int i = 0; i < devices_.size(); ++i)
-            if (devices_[i] != nullptr)
-                for (unsigned int iState = 0; iState < devices_[i]->getStateListRef().size(); ++iState)
-                    tempSet.insert(devices_[i]->getStateListRef()[iState]);
+        for (auto & elem : devices_)
+            if (elem != nullptr)
+                for (unsigned int iState = 0; iState < elem->getStateListRef().size(); ++iState)
+                    tempSet.insert(elem->getStateListRef()[iState]);
 
         // Copy the content of the std::set back to the actual vector
         activeStatesTicked_.clear();
-        for (std::set<InputState*>::const_iterator it = tempSet.begin();it != tempSet.end(); ++it)
-            activeStatesTicked_.push_back(*it);
+        for (const auto & elem : tempSet)
+            activeStatesTicked_.push_back(elem);
 
         // Check whether we have to change the mouse mode
Index: /code/branches/cpp11_v2/src/libraries/core/input/JoyStick.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/input/JoyStick.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/input/JoyStick.cc	(revision 10821)
@@ -186,6 +186,6 @@
     void JoyStick::clearBuffersImpl()
     {
-        for (int j = 0; j < 4; ++j)
-            povStates_[j] = 0;
+        for (auto & elem : povStates_)
+            elem = 0;
     }
 
Index: /code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc	(revision 10821)
@@ -153,7 +153,7 @@
     void KeyBinder::buttonThresholdChanged()
     {
-        for (unsigned int i = 0; i < allHalfAxes_.size(); i++)
-            if (!allHalfAxes_[i]->bButtonThresholdUser_)
-                allHalfAxes_[i]->buttonThreshold_ = this->buttonThreshold_;
+        for (auto & elem : allHalfAxes_)
+            if (!elem->bButtonThresholdUser_)
+                elem->buttonThreshold_ = this->buttonThreshold_;
     }
 
@@ -383,6 +383,6 @@
             it->second->clear();
 
-        for (unsigned int i = 0; i < paramCommandBuffer_.size(); i++)
-            delete paramCommandBuffer_[i];
+        for (auto & elem : paramCommandBuffer_)
+            delete elem;
         paramCommandBuffer_.clear();
     }
@@ -394,7 +394,7 @@
     {
         // iterate over all buttons
-        for (std::map<std::string, Button*>::iterator it = this->allButtons_.begin(); it != this->allButtons_.end(); ++it)
-        {
-            Button* button = it->second;
+        for (const auto & elem : this->allButtons_)
+        {
+            Button* button = elem.second;
 
             // iterate over all modes
@@ -465,6 +465,6 @@
         this->mousePosition_[1] = 0.0f;
 
-        for (unsigned int i = 0; i < MouseAxisCode::numberOfAxes * 2; i++)
-            mouseAxes_[i].reset();
+        for (auto & elem : mouseAxes_)
+            elem.reset();
     }
 
@@ -505,5 +505,5 @@
         }
 
-        for (unsigned int i = 0; i < MouseAxisCode::numberOfAxes * 2; i++)
+        for (auto & elem : mouseAxes_)
         {
             // Why dividing relative value by dt? The reason lies in the simple fact, that when you
@@ -515,8 +515,8 @@
             {
                 // just ignore if dt == 0.0 because we have multiplied by 0.0 anyway..
-                mouseAxes_[i].relVal_ /= dt;
-            }
-
-            tickHalfAxis(mouseAxes_[i]);
+                elem.relVal_ /= dt;
+            }
+
+            tickHalfAxis(elem);
         }
     }
Index: /code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h	(revision 10821)
@@ -226,13 +226,13 @@
     {
         // execute all buffered bindings (additional parameter)
-        for (unsigned int i = 0; i < paramCommandBuffer_.size(); i++)
+        for (auto & elem : paramCommandBuffer_)
         {
-            paramCommandBuffer_[i]->rel_ *= dt;
-            paramCommandBuffer_[i]->execute();
+            elem->rel_ *= dt;
+            elem->execute();
         }
 
         // always reset the relative movement of the mouse
-        for (unsigned int i = 0; i < MouseAxisCode::numberOfAxes * 2; i++)
-            mouseAxes_[i].relVal_ = 0.0f;
+        for (auto & elem : mouseAxes_)
+            elem.relVal_ = 0.0f;
     }
 }// tolua_export
Index: /code/branches/cpp11_v2/src/libraries/core/input/Mouse.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/input/Mouse.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/input/Mouse.cc	(revision 10821)
@@ -82,6 +82,6 @@
             IntVector2 rel(e.state.X.rel, e.state.Y.rel);
             IntVector2 clippingSize(e.state.width, e.state.height);
-            for (unsigned int i = 0; i < inputStates_.size(); ++i)
-                inputStates_[i]->mouseMoved(abs, rel, clippingSize);
+            for (auto & elem : inputStates_)
+                elem->mouseMoved(abs, rel, clippingSize);
         }
 
@@ -89,6 +89,6 @@
         if (e.state.Z.rel != 0)
         {
-            for (unsigned int i = 0; i < inputStates_.size(); ++i)
-                inputStates_[i]->mouseScrolled(e.state.Z.abs, e.state.Z.rel);
+            for (auto & elem : inputStates_)
+                elem->mouseScrolled(e.state.Z.abs, e.state.Z.rel);
         }
 
Index: /code/branches/cpp11_v2/src/libraries/core/module/DynLibManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/module/DynLibManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/module/DynLibManager.cc	(revision 10821)
@@ -75,8 +75,8 @@
     {
         // Unload & delete resources in turn
-        for (DynLibList::iterator it = mLibList.begin(); it != mLibList.end(); ++it)
+        for (auto & elem : mLibList)
         {
-            it->second->unload();
-            delete it->second;
+            elem.second->unload();
+            delete elem.second;
         }
 
Index: /code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc	(revision 10821)
@@ -59,6 +59,6 @@
     {
         const std::set<StaticallyInitializedInstance*>& instances = this->staticallyInitializedInstancesByType_[type];
-        for (std::set<StaticallyInitializedInstance*>::iterator it = instances.begin(); it != instances.end(); ++it)
-            (*it)->load();
+        for (const auto & instance : instances)
+            (instance)->load();
     }
 
@@ -75,6 +75,6 @@
         std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*>> copy(this->staticallyInitializedInstancesByType_);
         this->staticallyInitializedInstancesByType_.clear();
-        for (std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*>>::iterator it1 = copy.begin(); it1 != copy.end(); ++it1)
-            for (std::set<StaticallyInitializedInstance*>::iterator it2 = it1->second.begin(); it2 != it1->second.end(); ++it2)
+        for (auto & elem : copy)
+            for (std::set<StaticallyInitializedInstance*>::iterator it2 = elem.second.begin(); it2 != elem.second.end(); ++it2)
                 delete (*it2);
     }
Index: /code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc	(revision 10821)
@@ -59,8 +59,8 @@
         ModifyConsoleCommand("PluginManager", __CC_PluginManager_unload_name).setObject(nullptr);
 
-        for (std::map<std::string, PluginReference*>::iterator it = this->references_.begin(); it != this->references_.end(); ++it)
-            delete it->second;
-        for (std::map<std::string, Plugin*>::iterator it = this->plugins_.begin(); it != this->plugins_.end(); ++it)
-            delete it->second;
+        for (auto & elem : this->references_)
+            delete elem.second;
+        for (auto & elem : this->plugins_)
+            delete elem.second;
     }
 
@@ -68,8 +68,8 @@
     {
         const std::vector<std::string>& pluginPaths = ApplicationPaths::getInstance().getPluginPaths();
-        for (std::vector<std::string>::const_iterator it = pluginPaths.begin(); it != pluginPaths.end(); ++it)
+        for (auto libraryName : pluginPaths)
         {
             std::string name;
-            std::string libraryName = (*it);
+            
             std::string filename = libraryName +  + specialConfig::pluginExtension;
             std::ifstream infile(filename.c_str());
Index: /code/branches/cpp11_v2/src/libraries/core/module/StaticInitializationManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/module/StaticInitializationManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/module/StaticInitializationManager.cc	(revision 10821)
@@ -50,6 +50,6 @@
     {
         // attention: loading a module may add new handlers to the list
-        for (std::list<StaticInitializationHandler*>::iterator it = this->handlers_.begin(); it != this->handlers_.end(); ++it)
-            (*it)->loadModule(module);
+        for (auto & elem : this->handlers_)
+            (elem)->loadModule(module);
     }
 
Index: /code/branches/cpp11_v2/src/libraries/core/object/Context.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/object/Context.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/object/Context.cc	(revision 10821)
@@ -70,6 +70,6 @@
         // unregister context from object lists before object lists are destroyed
         this->unregisterObject();
-        for (size_t i = 0; i < this->objectLists_.size(); ++i)
-            delete this->objectLists_[i];
+        for (auto & elem : this->objectLists_)
+            delete elem;
     }
 
Index: /code/branches/cpp11_v2/src/libraries/core/object/Listable.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/object/Listable.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/object/Listable.cc	(revision 10821)
@@ -76,6 +76,6 @@
     void Listable::unregisterObject()
     {
-        for (size_t i = 0; i < this->elements_.size(); ++i)
-            Listable::deleteObjectListElement(this->elements_[i]);
+        for (auto & elem : this->elements_)
+            Listable::deleteObjectListElement(elem);
         this->elements_.clear();
     }
@@ -91,8 +91,8 @@
         this->elements_.clear();
 
-        for (size_t i = 0; i < copy.size(); ++i)
+        for (auto & elem : copy)
         {
-            copy[i]->changeContext(this->context_, context);
-            Listable::deleteObjectListElement(copy[i]);
+            elem->changeContext(this->context_, context);
+            Listable::deleteObjectListElement(elem);
         }
 
Index: /code/branches/cpp11_v2/src/libraries/core/object/ObjectListBase.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/object/ObjectListBase.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/object/ObjectListBase.cc	(revision 10821)
@@ -92,6 +92,6 @@
     void ObjectListBase::notifyRemovalListeners(ObjectListBaseElement* element) const
     {
-        for (std::vector<ObjectListElementRemovalListener*>::const_iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
-            (*it)->removedElement(element);
+        for (const auto & elem : this->listeners_)
+            (elem)->removedElement(element);
     }
 
Index: /code/branches/cpp11_v2/src/libraries/core/singleton/ScopeManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/core/singleton/ScopeManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/core/singleton/ScopeManager.cc	(revision 10821)
@@ -73,12 +73,12 @@
     void ScopeManager::activateListenersForScope(ScopeID::Value scope)
     {
-        for (std::set<ScopeListener*>::iterator it = this->listeners_[scope].begin(); it != this->listeners_[scope].end(); ++it)
-            this->activateListener(*it);
+        for (const auto & elem : this->listeners_[scope])
+            this->activateListener(elem);
     }
 
     void ScopeManager::deactivateListenersForScope(ScopeID::Value scope)
     {
-        for (std::set<ScopeListener*>::iterator it = this->listeners_[scope].begin(); it != this->listeners_[scope].end(); ++it)
-            this->deactivateListener(*it);
+        for (const auto & elem : this->listeners_[scope])
+            this->deactivateListener(elem);
     }
 
Index: /code/branches/cpp11_v2/src/libraries/network/FunctionCall.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/network/FunctionCall.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/network/FunctionCall.cc	(revision 10821)
@@ -131,7 +131,7 @@
   *(uint32_t*)(mem+2*sizeof(uint32_t)) = this->objectID_;
   mem += 3*sizeof(uint32_t);
-  for( std::vector<MultiType>::iterator it = this->arguments_.begin(); it!=this->arguments_.end(); ++it )
+  for(auto & elem : this->arguments_)
   {
-    it->exportData( mem );
+    elem.exportData( mem );
   }
 }
Index: /code/branches/cpp11_v2/src/libraries/network/Host.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/network/Host.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/network/Host.cc	(revision 10821)
@@ -80,9 +80,9 @@
   void Host::addPacket(ENetPacket *packet, int clientID, uint8_t channelID)
   {
-    for( std::vector<Host*>::iterator it = instances_s.begin(); it!=instances_s.end(); ++it )
+    for(auto & instances_ : instances_s)
     {
-      if( (*it)->isActive() )
+      if( (instances_)->isActive() )
       {
-        (*it)->queuePacket(packet, clientID, channelID);
+        (instances_)->queuePacket(packet, clientID, channelID);
       }
     }
@@ -97,7 +97,7 @@
   void Host::sendChat(const std::string& message, unsigned int sourceID, unsigned int targetID)
   {
-    for( std::vector<Host*>::iterator it = instances_s.begin(); it!=instances_s.end(); ++it )
-      if( (*it)->isActive() )
-        (*it)->doSendChat(message, sourceID, targetID);
+    for(auto & instances_ : instances_s)
+      if( (instances_)->isActive() )
+        (instances_)->doSendChat(message, sourceID, targetID);
   }
 
@@ -114,9 +114,9 @@
   bool Host::isServer()
   {
-    for (std::vector<Host*>::iterator it=instances_s.begin(); it!=instances_s.end(); ++it )
+    for (auto & instances_ : instances_s)
     {
-      if( (*it)->isActive() )
+      if( (instances_)->isActive() )
       {
-        if( (*it)->isServer_() )
+        if( (instances_)->isServer_() )
           return true;
       }
Index: /code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc	(revision 10821)
@@ -88,6 +88,6 @@
     }
     // delete all Synchronisable Variables from syncList_ ( which are also in stringList_ )
-    for(std::vector<SynchronisableVariableBase*>::iterator it = syncList_.begin(); it!=syncList_.end(); it++)
-      delete (*it);
+    for(auto & elem : syncList_)
+      delete (elem);
     syncList_.clear();
     stringList_.clear();
Index: /code/branches/cpp11_v2/src/libraries/tools/DebugDrawer.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/tools/DebugDrawer.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/tools/DebugDrawer.cc	(revision 10821)
@@ -392,11 +392,11 @@
             manualObject->estimateVertexCount(lineVertices.size());
             manualObject->estimateIndexCount(lineIndices.size());
-            for (std::list<VertexPair>::iterator i = lineVertices.begin(); i != lineVertices.end(); i++)
+            for (auto & elem : lineVertices)
             {
-                manualObject->position(i->first);
-                manualObject->colour(i->second);
+                manualObject->position(elem.first);
+                manualObject->colour(elem.second);
             }
-            for (std::list<int>::iterator i = lineIndices.begin(); i != lineIndices.end(); i++)
-                manualObject->index(*i);
+            for (auto & elem : lineIndices)
+                manualObject->index(elem);
         }
         else
@@ -409,11 +409,11 @@
             manualObject->estimateVertexCount(triangleVertices.size());
             manualObject->estimateIndexCount(triangleIndices.size());
-            for (std::list<VertexPair>::iterator i = triangleVertices.begin(); i != triangleVertices.end(); i++)
+            for (auto & elem : triangleVertices)
             {
-                manualObject->position(i->first);
-                manualObject->colour(i->second.r, i->second.g, i->second.b, fillAlpha);
+                manualObject->position(elem.first);
+                manualObject->colour(elem.second.r, elem.second.g, elem.second.b, fillAlpha);
             }
-            for (std::list<int>::iterator i = triangleIndices.begin(); i != triangleIndices.end(); i++)
-                manualObject->index(*i);
+            for (auto & elem : triangleIndices)
+                manualObject->index(elem);
         }
         else
Index: /code/branches/cpp11_v2/src/libraries/tools/IcoSphere.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/tools/IcoSphere.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/tools/IcoSphere.cc	(revision 10821)
@@ -116,7 +116,7 @@
             std::list<TriangleIndices> faces2;
 
-            for (std::list<TriangleIndices>::iterator j = faces.begin(); j != faces.end(); j++)
+            for (auto f : faces)
             {
-                TriangleIndices f = *j;
+                
                 int a = getMiddlePoint(f.v1, f.v2);
                 int b = getMiddlePoint(f.v2, f.v3);
@@ -194,8 +194,8 @@
     void IcoSphere::addToLineIndices(int baseIndex, std::list<int>* target) const
     {
-        for (std::list<LineIndices>::const_iterator i = lineIndices.begin(); i != lineIndices.end(); i++)
+        for (const auto & elem : lineIndices)
         {
-            target->push_back(baseIndex + (*i).v1);
-            target->push_back(baseIndex + (*i).v2);
+            target->push_back(baseIndex + (elem).v1);
+            target->push_back(baseIndex + (elem).v2);
         }
     }
@@ -203,9 +203,9 @@
     void IcoSphere::addToTriangleIndices(int baseIndex, std::list<int>* target) const
     {
-        for (std::list<TriangleIndices>::const_iterator i = faces.begin(); i != faces.end(); i++)
+        for (const auto & elem : faces)
         {
-            target->push_back(baseIndex + (*i).v1);
-            target->push_back(baseIndex + (*i).v2);
-            target->push_back(baseIndex + (*i).v3);
+            target->push_back(baseIndex + (elem).v1);
+            target->push_back(baseIndex + (elem).v2);
+            target->push_back(baseIndex + (elem).v3);
         }
     }
@@ -217,6 +217,6 @@
         transform.setScale(Ogre::Vector3(scale, scale, scale));
 
-        for (int i = 0; i < (int) vertices.size(); i++)
-            target->push_back(VertexPair(transform * vertices[i], colour));
+        for (auto & elem : vertices)
+            target->push_back(VertexPair(transform * elem, colour));
 
         return vertices.size();
Index: /code/branches/cpp11_v2/src/libraries/tools/Shader.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/tools/Shader.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/tools/Shader.cc	(revision 10821)
@@ -197,23 +197,23 @@
     {
         // iterate through the list of parameters
-        for (std::list<ParameterContainer>::iterator it = this->parameters_.begin(); it != this->parameters_.end(); ++it)
-        {
-            Ogre::Technique* techniquePtr = materialPtr->getTechnique(it->technique_);
+        for (auto & elem : this->parameters_)
+        {
+            Ogre::Technique* techniquePtr = materialPtr->getTechnique(elem.technique_);
             if (techniquePtr)
             {
-                Ogre::Pass* passPtr = techniquePtr->getPass(it->pass_);
+                Ogre::Pass* passPtr = techniquePtr->getPass(elem.pass_);
                 if (passPtr)
                 {
                     // change the value of the parameter depending on its type
-                    if (it->value_.isType<int>())
-                        passPtr->getFragmentProgramParameters()->setNamedConstant(it->parameter_, it->value_.get<int>());
-                    else if (it->value_.isType<float>())
-                        passPtr->getFragmentProgramParameters()->setNamedConstant(it->parameter_, it->value_.get<float>());
+                    if (elem.value_.isType<int>())
+                        passPtr->getFragmentProgramParameters()->setNamedConstant(elem.parameter_, elem.value_.get<int>());
+                    else if (elem.value_.isType<float>())
+                        passPtr->getFragmentProgramParameters()->setNamedConstant(elem.parameter_, elem.value_.get<float>());
                 }
                 else
-                    orxout(internal_warning) << "No pass " << it->pass_ << " in technique " << it->technique_ << " in compositor \"" << this->compositorName_ << "\" or pass has no shader." << endl;
+                    orxout(internal_warning) << "No pass " << elem.pass_ << " in technique " << elem.technique_ << " in compositor \"" << this->compositorName_ << "\" or pass has no shader." << endl;
             }
             else
-                orxout(internal_warning) << "No technique " << it->technique_ << " in compositor \"" << this->compositorName_ << "\" or technique has no pass with shader." << endl;
+                orxout(internal_warning) << "No technique " << elem.technique_ << " in compositor \"" << this->compositorName_ << "\" or technique has no pass with shader." << endl;
         }
         this->parameters_.clear();
@@ -228,6 +228,6 @@
         {
             const Ogre::Root::PluginInstanceList& plugins = Ogre::Root::getSingleton().getInstalledPlugins();
-            for (size_t i = 0; i < plugins.size(); ++i)
-                if (plugins[i]->getName() == "Cg Program Manager")
+            for (auto & plugin : plugins)
+                if (plugin->getName() == "Cg Program Manager")
                     return true;
         }
Index: /code/branches/cpp11_v2/src/libraries/util/DisplayStringConversions.h
===================================================================
--- /code/branches/cpp11_v2/src/libraries/util/DisplayStringConversions.h	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/util/DisplayStringConversions.h	(revision 10821)
@@ -51,7 +51,7 @@
             {
                 Ogre::UTFString::code_point cp;
-                for (unsigned int i = 0; i < input.size(); ++i)
+                for (auto & elem : input)
                 {
-                  cp = input[i];
+                  cp = elem;
                   cp &= 0xFF;
                   output->append(1, cp);
Index: /code/branches/cpp11_v2/src/libraries/util/Serialise.h
===================================================================
--- /code/branches/cpp11_v2/src/libraries/util/Serialise.h	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/util/Serialise.h	(revision 10821)
@@ -672,6 +672,6 @@
     {
         uint32_t tempsize = sizeof(uint32_t); // for the number of entries
-        for( typename std::set<T>::iterator it=((std::set<T>*)(&variable))->begin(); it!=((std::set<T>*)(&variable))->end(); ++it)
-            tempsize += returnSize( *it );
+        for(const auto & elem : *((std::set<T>*)(&variable)))
+            tempsize += returnSize( elem );
         return tempsize;
     }
Index: /code/branches/cpp11_v2/src/libraries/util/SignalHandler.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/util/SignalHandler.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/util/SignalHandler.cc	(revision 10821)
@@ -81,7 +81,7 @@
     void SignalHandler::dontCatch()
     {
-      for ( SignalRecList::iterator it = sigRecList.begin(); it != sigRecList.end(); it++ )
-      {
-        signal( it->signal, it->handler );
+      for (auto & elem : sigRecList)
+      {
+        signal( elem.signal, elem.handler );
       }
 
@@ -133,7 +133,7 @@
       }
 
-      for ( SignalCallbackList::iterator it = SignalHandler::getInstance().callbackList.begin(); it != SignalHandler::getInstance().callbackList.end(); it++  )
-      {
-        (*(it->cb))( it->someData );
+      for (auto & elem : SignalHandler::getInstance().callbackList)
+      {
+        (*(elem.cb))( elem.someData );
       }
 
Index: /code/branches/cpp11_v2/src/libraries/util/SmallObjectAllocator.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/util/SmallObjectAllocator.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/util/SmallObjectAllocator.cc	(revision 10821)
@@ -53,6 +53,6 @@
     SmallObjectAllocator::~SmallObjectAllocator()
     {
-        for (std::vector<char*>::iterator it = this->blocks_.begin(); it != this->blocks_.end(); ++it)
-            delete[] *it;
+        for (auto & elem : this->blocks_)
+            delete[] elem;
     }
 
Index: /code/branches/cpp11_v2/src/libraries/util/StringUtils.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/util/StringUtils.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/util/StringUtils.cc	(revision 10821)
@@ -262,7 +262,7 @@
         std::string output(str.size() * 2, ' ');
         size_t i = 0;
-        for (size_t pos = 0; pos < str.size(); ++pos)
-        {
-            switch (str[pos])
+        for (auto & elem : str)
+        {
+            switch (elem)
             {
             case '\\': output[i] = '\\'; output[i + 1] = '\\'; break;
@@ -276,5 +276,5 @@
             case  '"': output[i] = '\\'; output[i + 1] =  '"'; break;
             case '\0': output[i] = '\\'; output[i + 1] =  '0'; break;
-            default  : output[i] = str[pos]; ++i; continue;
+            default  : output[i] = elem; ++i; continue;
             }
             i += 2;
@@ -336,7 +336,7 @@
     void lowercase(std::string* str)
     {
-        for (size_t i = 0; i < str->size(); ++i)
-        {
-            (*str)[i] = static_cast<char>(tolower((*str)[i]));
+        for (auto & elem : *str)
+        {
+            elem = static_cast<char>(tolower(elem));
         }
     }
@@ -353,7 +353,7 @@
     void uppercase(std::string* str)
     {
-        for (size_t i = 0; i < str->size(); ++i)
-        {
-            (*str)[i] = static_cast<char>(toupper((*str)[i]));
+        for (auto & elem : *str)
+        {
+            elem = static_cast<char>(toupper(elem));
         }
     }
@@ -460,9 +460,9 @@
     {
         size_t j = 0;
-        for (size_t i = 0; i < str.size(); ++i)
-        {
-            if (str[i] == target)
+        for (auto & elem : str)
+        {
+            if (elem == target)
             {
-                str[i] = replacement;
+                elem = replacement;
                 ++j;
             }
Index: /code/branches/cpp11_v2/src/libraries/util/output/BaseWriter.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/util/output/BaseWriter.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/util/output/BaseWriter.cc	(revision 10821)
@@ -116,7 +116,7 @@
 
         // iterate over all strings in the config-vector
-        for (size_t i = 0; i < this->configurableAdditionalContexts_.size(); ++i)
+        for (auto & full_name : this->configurableAdditionalContexts_)
         {
-            const std::string& full_name = this->configurableAdditionalContexts_[i];
+            
 
             // split the name into main-name and sub-name (if given; otherwise sub-name remains empty). both names are separated by ::
Index: /code/branches/cpp11_v2/src/libraries/util/output/MemoryWriter.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/util/output/MemoryWriter.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/util/output/MemoryWriter.cc	(revision 10821)
@@ -65,7 +65,7 @@
     void MemoryWriter::resendOutput(OutputListener* listener) const
     {
-        for (size_t i = 0; i < this->messages_.size(); ++i)
+        for (auto & message : this->messages_)
         {
-            const Message& message = this->messages_[i];
+            
             listener->unfilteredOutput(message.level, *message.context, message.lines);
         }
Index: /code/branches/cpp11_v2/src/libraries/util/output/OutputListener.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/util/output/OutputListener.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/util/output/OutputListener.cc	(revision 10821)
@@ -111,6 +111,6 @@
         this->levelMask_ = mask;
 
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->listeners_[i]->updatedLevelMask(this);
+        for (auto & elem : this->listeners_)
+            elem->updatedLevelMask(this);
     }
 
@@ -142,6 +142,6 @@
         this->additionalContextsLevelMask_ = mask;
 
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->listeners_[i]->updatedAdditionalContextsLevelMask(this);
+        for (auto & elem : this->listeners_)
+            elem->updatedAdditionalContextsLevelMask(this);
     }
 
@@ -153,6 +153,6 @@
         this->additionalContextsMask_ = mask;
 
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->listeners_[i]->updatedAdditionalContextsMask(this);
+        for (auto & elem : this->listeners_)
+            elem->updatedAdditionalContextsMask(this);
     }
 
Index: /code/branches/cpp11_v2/src/libraries/util/output/OutputManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/util/output/OutputManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/util/output/OutputManager.cc	(revision 10821)
@@ -132,6 +132,6 @@
         vectorize(message, '\n', &lines);
 
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->listeners_[i]->unfilteredOutput(level, context, lines);
+        for (auto & elem : this->listeners_)
+            elem->unfilteredOutput(level, context, lines);
     }
 
@@ -179,6 +179,6 @@
     {
         int mask = 0;
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            mask |= this->listeners_[i]->getLevelMask();
+        for (auto & elem : this->listeners_)
+            mask |= elem->getLevelMask();
         this->combinedLevelMask_ = static_cast<OutputLevel>(mask);
     }
@@ -190,6 +190,6 @@
     {
         int mask = 0;
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            mask |= this->listeners_[i]->getAdditionalContextsLevelMask();
+        for (auto & elem : this->listeners_)
+            mask |= elem->getAdditionalContextsLevelMask();
         this->combinedAdditionalContextsLevelMask_ = static_cast<OutputLevel>(mask);
     }
@@ -201,6 +201,6 @@
     {
         this->combinedAdditionalContextsMask_ = 0;
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->combinedAdditionalContextsMask_ |= this->listeners_[i]->getAdditionalContextsMask();
+        for (auto & elem : this->listeners_)
+            this->combinedAdditionalContextsMask_ |= elem->getAdditionalContextsMask();
     }
 
Index: /code/branches/cpp11_v2/src/libraries/util/output/SubcontextOutputListener.cc
===================================================================
--- /code/branches/cpp11_v2/src/libraries/util/output/SubcontextOutputListener.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/libraries/util/output/SubcontextOutputListener.cc	(revision 10821)
@@ -79,8 +79,8 @@
 
         // compose the mask of subcontexts and build the set of sub-context-IDs
-        for (std::set<const OutputContextContainer*>::const_iterator it = subcontexts.begin(); it != subcontexts.end(); ++it)
+        for (const auto & subcontext : subcontexts)
         {
-            this->subcontextsCheckMask_ |= (*it)->mask;
-            this->subcontexts_.insert((*it)->sub_id);
+            this->subcontextsCheckMask_ |= (subcontext)->mask;
+            this->subcontexts_.insert((subcontext)->sub_id);
         }
 
Index: /code/branches/cpp11_v2/src/modules/docking/Dock.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/docking/Dock.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/docking/Dock.cc	(revision 10821)
@@ -327,8 +327,8 @@
     const DockingEffect* Dock::getEffect(unsigned int i) const
     {
-        for (std::list<DockingEffect*>::const_iterator effect = this->effects_.begin(); effect != this->effects_.end(); ++effect)
+        for (const auto & elem : this->effects_)
         {
             if(i == 0)
-               return *effect;
+               return elem;
             i--;
         }
@@ -346,8 +346,8 @@
     const DockingAnimation* Dock::getAnimation(unsigned int i) const
     {
-        for (std::list<DockingAnimation*>::const_iterator animation = this->animations_.begin(); animation != this->animations_.end(); ++animation)
+        for (const auto & elem : this->animations_)
         {
             if(i == 0)
-               return *animation;
+               return elem;
             i--;
         }
Index: /code/branches/cpp11_v2/src/modules/docking/DockingAnimation.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/docking/DockingAnimation.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/docking/DockingAnimation.cc	(revision 10821)
@@ -57,10 +57,10 @@
         bool check = true;
 
-        for (std::list<DockingAnimation*>::iterator animation = animations.begin(); animation != animations.end(); animation++)
+        for (auto & animations_animation : animations)
         {
             if(dock)
-                check &= (*animation)->docking(player);
+                check &= (animations_animation)->docking(player);
             else
-                check &= (*animation)->release(player);
+                check &= (animations_animation)->release(player);
         }
 
Index: /code/branches/cpp11_v2/src/modules/docking/DockingEffect.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/docking/DockingEffect.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/docking/DockingEffect.cc	(revision 10821)
@@ -53,10 +53,10 @@
         bool check = true;
 
-        for (std::list<DockingEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++)
+        for (auto & effects_effect : effects)
         {
             if (dock)
-                check &= (*effect)->docking(player);
+                check &= (effects_effect)->docking(player);
             else
-                check &= (*effect)->release(player);
+                check &= (effects_effect)->release(player);
         }
 
Index: /code/branches/cpp11_v2/src/modules/gametypes/RaceCheckPoint.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/gametypes/RaceCheckPoint.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/gametypes/RaceCheckPoint.cc	(revision 10821)
@@ -146,11 +146,11 @@
     {
         Vector3 checkpoints(-1,-1,-1); int count=0;
-        for (std::set<int>::iterator it= nextCheckpoints_.begin();it!=nextCheckpoints_.end(); it++ )
+        for (const auto & elem : nextCheckpoints_)
         {
             switch (count)
             {
-                case 0: checkpoints.x = static_cast<Ogre::Real>(*it); break;
-                case 1: checkpoints.y = static_cast<Ogre::Real>(*it); break;
-                case 2: checkpoints.z = static_cast<Ogre::Real>(*it); break;
+                case 0: checkpoints.x = static_cast<Ogre::Real>(elem); break;
+                case 1: checkpoints.y = static_cast<Ogre::Real>(elem); break;
+                case 2: checkpoints.z = static_cast<Ogre::Real>(elem); break;
             }
             ++count;
Index: /code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceController.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceController.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceController.cc	(revision 10821)
@@ -154,16 +154,16 @@
     {
         std::map<RaceCheckPoint*, int> zaehler; // counts how many times the checkpoint was reached (for simulation)
-        for (unsigned int i = 0; i < allCheckpoints.size(); i++)
-        {
-            zaehler.insert(std::pair<RaceCheckPoint*, int>(allCheckpoints[i],0));
+        for (auto & allCheckpoint : allCheckpoints)
+        {
+            zaehler.insert(std::pair<RaceCheckPoint*, int>(allCheckpoint,0));
         }
         int maxWays = rekSimulationCheckpointsReached(currentCheckpoint, zaehler);
 
         std::vector<RaceCheckPoint*> returnVec;
-        for (std::map<RaceCheckPoint*, int>::iterator iter = zaehler.begin(); iter != zaehler.end(); iter++)
-        {
-            if (iter->second == maxWays)
-            {
-                returnVec.push_back(iter->first);
+        for (auto & elem : zaehler)
+        {
+            if (elem.second == maxWays)
+            {
+                returnVec.push_back(elem.first);
             }
         }
@@ -226,7 +226,7 @@
 
         // find the next checkpoint with the minimal distance
-        for (std::set<int>::iterator it = raceCheckpoint->getNextCheckpoints().begin(); it != raceCheckpoint->getNextCheckpoints().end(); ++it)
-        {
-            RaceCheckPoint* nextRaceCheckPoint = findCheckpoint(*it);
+        for (auto elem : raceCheckpoint->getNextCheckpoints())
+        {
+            RaceCheckPoint* nextRaceCheckPoint = findCheckpoint(elem);
             float distance = recCalculateDistance(nextRaceCheckPoint, this->getControllableEntity()->getPosition());
 
@@ -289,7 +289,7 @@
     RaceCheckPoint* SpaceRaceController::findCheckpoint(int index) const
     {
-        for (size_t i = 0; i < this->checkpoints_.size(); ++i)
-            if (this->checkpoints_[i]->getCheckpointIndex() == index)
-                return this->checkpoints_[i];
+        for (auto & elem : this->checkpoints_)
+            if (elem->getCheckpointIndex() == index)
+                return elem;
         return nullptr;
     }
@@ -414,9 +414,9 @@
         btScalar radiusObject;
 
-        for (std::vector<StaticEntity*>::const_iterator it = allObjects.begin(); it != allObjects.end(); ++it)
-        {
-            for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape) != nullptr; everyShape++)
-            {
-                btCollisionShape* currentShape = (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape();
+        for (const auto & allObject : allObjects)
+        {
+            for (int everyShape=0; (allObject)->getAttachedCollisionShape(everyShape) != nullptr; everyShape++)
+            {
+                btCollisionShape* currentShape = (allObject)->getAttachedCollisionShape(everyShape)->getCollisionShape();
                 if(currentShape == nullptr)
                 continue;
Index: /code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceManager.cc	(revision 10821)
@@ -54,6 +54,6 @@
     SpaceRaceManager::~SpaceRaceManager()
     {
-        for (size_t i = 0; i < this->checkpoints_.size(); ++i)
-        this->checkpoints_[i]->destroy();
+        for (auto & elem : this->checkpoints_)
+        elem->destroy();
     }
 
@@ -77,11 +77,11 @@
         }
 
-        for ( std::map< PlayerInfo*, Player>::iterator it = players_.begin(); it != players_.end(); ++it)
+        for (auto & elem : players_)
         {
 
-            for (size_t i = 0; i < this->checkpoints_.size(); ++i)
+            for (auto & _i : this->checkpoints_)
             {
-                if (this->checkpoints_[i]->playerWasHere(it->first)){
-                this->checkpointReached(this->checkpoints_[i], it->first /*this->checkpoints_[i]->getPlayer()*/);
+                if (_i->playerWasHere(elem.first)){
+                this->checkpointReached(_i, elem.first /*this->checkpoints_[i]->getPlayer()*/);
                 }
             }
@@ -113,7 +113,7 @@
     RaceCheckPoint* SpaceRaceManager::findCheckpoint(int index) const
     {
-        for (size_t i = 0; i < this->checkpoints_.size(); ++i)
-        if (this->checkpoints_[i]->getCheckpointIndex() == index)
-        return this->checkpoints_[i];
+        for (auto & elem : this->checkpoints_)
+        if (elem->getCheckpointIndex() == index)
+        return elem;
         return nullptr;
     }
@@ -125,6 +125,6 @@
             // the player already visited an old checkpoint; see which checkpoints are possible now
             const std::set<int>& possibleCheckpoints = oldCheckpoint->getNextCheckpoints();
-            for (std::set<int>::const_iterator it = possibleCheckpoints.begin(); it != possibleCheckpoints.end(); ++it)
-            if (this->findCheckpoint(*it) == newCheckpoint)
+            for (const auto & possibleCheckpoint : possibleCheckpoints)
+            if (this->findCheckpoint(possibleCheckpoint) == newCheckpoint)
             return true;
             return false;
@@ -179,6 +179,6 @@
         {
             const std::set<int>& oldVisible = oldCheckpoint->getNextCheckpoints();
-            for (std::set<int>::const_iterator it = oldVisible.begin(); it != oldVisible.end(); ++it)
-            this->findCheckpoint(*it)->setRadarVisibility(false);
+            for (const auto & elem : oldVisible)
+            this->findCheckpoint(elem)->setRadarVisibility(false);
         }
 
@@ -188,6 +188,6 @@
 
             const std::set<int>& newVisible = newCheckpoint->getNextCheckpoints();
-            for (std::set<int>::const_iterator it = newVisible.begin(); it != newVisible.end(); ++it)
-            this->findCheckpoint(*it)->setRadarVisibility(true);
+            for (const auto & elem : newVisible)
+            this->findCheckpoint(elem)->setRadarVisibility(true);
         }
     }
Index: /code/branches/cpp11_v2/src/modules/jump/Jump.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/jump/Jump.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/jump/Jump.cc	(revision 10821)
@@ -633,10 +633,10 @@
 
 
-        for (int i = 0; i < numI; ++i)
+        for (auto & elem : matrix)
         {
             for (int j = 0; j < numJ; ++j)
             {
-                matrix[i][j].type = PLATFORM_EMPTY;
-                matrix[i][j].done = false;
+                elem[j].type = PLATFORM_EMPTY;
+                elem[j].done = false;
             }
         }
@@ -795,5 +795,5 @@
 
         // Fill matrix with selected platform types
-        for (int i = 0; i < numI; ++ i)
+        for (auto & elem : matrix)
         {
             for (int j = 0; j < numJ; ++ j)
@@ -801,11 +801,11 @@
                 if (rand()%3 == 0)
                 {
-                    matrix[i][j].type = platformtype1;
+                    elem[j].type = platformtype1;
                 }
                 else
                 {
-                    matrix[i][j].type = platformtype2;
+                    elem[j].type = platformtype2;
                 }
-                matrix[i][j].done = false;
+                elem[j].done = false;
             }
         }
Index: /code/branches/cpp11_v2/src/modules/mini4dgame/Mini4Dgame.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/mini4dgame/Mini4Dgame.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/mini4dgame/Mini4Dgame.cc	(revision 10821)
@@ -155,11 +155,11 @@
     {
         // first spawn human players to assign always the left bat to the player in singleplayer
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if (it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_))
-                this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+            if (elem.first->isHumanPlayer() && (elem.first->isReadyToSpawn() || this->bForceSpawn_))
+                this->spawnPlayer(elem.first);
         // now spawn bots
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if (!it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_))
-                this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+            if (!elem.first->isHumanPlayer() && (elem.first->isReadyToSpawn() || this->bForceSpawn_))
+                this->spawnPlayer(elem.first);
     }
 
Index: /code/branches/cpp11_v2/src/modules/notifications/NotificationManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/notifications/NotificationManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/notifications/NotificationManager.cc	(revision 10821)
@@ -69,6 +69,6 @@
     {
         // Destroys all Notifications.
-        for(std::multimap<std::time_t, Notification*>::iterator it = this->allNotificationsList_.begin(); it!= this->allNotificationsList_.end(); it++)
-            it->second->destroy();
+        for(auto & elem : this->allNotificationsList_)
+            elem.second->destroy();
         this->allNotificationsList_.clear();
 
@@ -152,10 +152,10 @@
         bool executed = false;
         // Clear all NotificationQueues that have the input sender as target.
-        for(std::map<const std::string, NotificationQueue*>::iterator it = this->queues_.begin(); it != this->queues_.end(); it++) // Iterate through all NotificationQueues.
-        {
-            const std::set<std::string>& set = it->second->getTargetsSet();
+        for(auto & elem : this->queues_) // Iterate through all NotificationQueues.
+        {
+            const std::set<std::string>& set = elem.second->getTargetsSet();
             // If either the sender is 'all', the NotificationQueue has as target all or the NotificationQueue has the input sender as a target.
             if(all || set.find(NotificationListener::ALL) != set.end() || set.find(sender) != set.end())
-                executed = it->second->tidy() || executed;
+                executed = elem.second->tidy() || executed;
         }
 
@@ -187,7 +187,7 @@
 
         // Insert the Notification in all NotificationQueues that have its sender as target.
-        for(std::map<const std::string, NotificationQueue*>::iterator it = this->queues_.begin(); it != this->queues_.end(); it++) // Iterate through all NotificationQueues.
-        {
-            const std::set<std::string>& set = it->second->getTargetsSet();
+        for(auto & elem : this->queues_) // Iterate through all NotificationQueues.
+        {
+            const std::set<std::string>& set = elem.second->getTargetsSet();
             bool bAll = set.find(NotificationListener::ALL) != set.end();
             // If either the Notification has as sender 'all', the NotificationQueue displays all Notifications or the NotificationQueue has the sender of the Notification as target.
@@ -195,6 +195,6 @@
             {
                 if(!bAll)
-                    this->notificationLists_[it->second->getName()]->insert(std::pair<std::time_t, Notification*>(time, notification)); // Insert the Notification in the notifications list of the current NotificationQueue.
-                it->second->update(notification, time); // Update the NotificationQueue.
+                    this->notificationLists_[elem.second->getName()]->insert(std::pair<std::time_t, Notification*>(time, notification)); // Insert the Notification in the notifications list of the current NotificationQueue.
+                elem.second->update(notification, time); // Update the NotificationQueue.
             }
         }
@@ -345,8 +345,8 @@
 
         // Iterate through all Notifications to determine whether any of them should belong to the newly registered NotificationQueue.
-        for(std::multimap<std::time_t, Notification*>::iterator it = this->allNotificationsList_.begin(); it != this->allNotificationsList_.end(); it++)
-        {
-            if(!bAll && set.find(it->second->getSender()) != set.end()) // Checks whether the listener has the sender of the current Notification as target.
-                map->insert(std::pair<std::time_t, Notification*>(it->first, it->second));
+        for(auto & elem : this->allNotificationsList_)
+        {
+            if(!bAll && set.find(elem.second->getSender()) != set.end()) // Checks whether the listener has the sender of the current Notification as target.
+                map->insert(std::pair<std::time_t, Notification*>(elem.first, elem.second));
         }
 
Index: /code/branches/cpp11_v2/src/modules/notifications/NotificationQueue.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/notifications/NotificationQueue.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/notifications/NotificationQueue.cc	(revision 10821)
@@ -206,8 +206,8 @@
         {
             // Add all Notifications that have been created after this NotificationQueue was created.
-            for(std::multimap<std::time_t, Notification*>::iterator it = notifications->begin(); it != notifications->end(); it++)
+            for(auto & notification : *notifications)
             {
-                if(it->first >= this->creationTime_)
-                    this->push(it->second, it->first);
+                if(notification.first >= this->creationTime_)
+                    this->push(notification.second, notification.first);
             }
         }
@@ -336,6 +336,6 @@
         this->ordering_.clear();
         // Delete all NotificationContainers in the list.
-        for(std::vector<NotificationContainer*>::iterator it = this->notifications_.begin(); it != this->notifications_.end(); it++)
-            delete *it;
+        for(auto & elem : this->notifications_)
+            delete elem;
 
         this->notifications_.clear();
@@ -426,5 +426,5 @@
         bool first = true;
         // Iterate through the set of targets.
-        for(std::set<std::string>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++)
+        for(const auto & elem : this->targets_)
         {
             if(!first)
@@ -432,5 +432,5 @@
             else
                 first = false;
-            stream << *it;
+            stream << elem;
         }
 
Index: /code/branches/cpp11_v2/src/modules/objects/Attacher.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/objects/Attacher.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/objects/Attacher.cc	(revision 10821)
@@ -61,6 +61,6 @@
         SUPER(Attacher, changedActivity);
 
-        for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
-            (*it)->setActive(this->isActive());
+        for (auto & elem : this->objects_)
+            (elem)->setActive(this->isActive());
     }
 
@@ -69,6 +69,6 @@
         SUPER(Attacher, changedVisibility);
 
-        for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
-            (*it)->setVisible(this->isVisible());
+        for (auto & elem : this->objects_)
+            (elem)->setVisible(this->isVisible());
     }
 
@@ -83,8 +83,8 @@
     {
         unsigned int i = 0;
-        for (std::list<WorldEntity*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+        for (const auto & elem : this->objects_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
 
             ++i;
Index: /code/branches/cpp11_v2/src/modules/objects/Script.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/objects/Script.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/objects/Script.cc	(revision 10821)
@@ -196,7 +196,7 @@
             {
                 const std::map<unsigned int, PlayerInfo*> clients = PlayerManager::getInstance().getClients();
-                for(std::map<unsigned int, PlayerInfo*>::const_iterator it = clients.begin(); it != clients.end(); it++)
+                for(const auto & client : clients)
                 {
-                    callStaticNetworkFunction(&Script::executeHelper, it->first, this->getCode(), this->getMode(), this->getNeedsGraphics());
+                    callStaticNetworkFunction(&Script::executeHelper, client.first, this->getCode(), this->getMode(), this->getNeedsGraphics());
                     if(this->times_ != Script::INF) // Decrement the number of remaining executions.
                     {
Index: /code/branches/cpp11_v2/src/modules/objects/SpaceBoundaries.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/objects/SpaceBoundaries.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/objects/SpaceBoundaries.cc	(revision 10821)
@@ -59,9 +59,9 @@
             this->pawnsIn_.clear();
 
-            for( std::vector<BillboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++)
+            for(auto & elem : this->billboards_)
             {
-                if( current->billy != nullptr)
-                {
-                    delete current->billy;
+                if( elem.billy != nullptr)
+                {
+                    delete elem.billy;
                 }
             }
@@ -138,8 +138,8 @@
     void SpaceBoundaries::removeAllBillboards()
     {
-        for( std::vector<BillboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++ )
-        {
-            current->usedYet = false;
-            current->billy->setVisible(false);
+        for(auto & elem : this->billboards_)
+        {
+            elem.usedYet = false;
+            elem.billy->setVisible(false);
         }
     }
@@ -208,7 +208,7 @@
         float distance;
         bool humanItem;
-        for( std::list<WeakPtr<Pawn>>::iterator current = pawnsIn_.begin(); current != pawnsIn_.end(); current++ )
-        {
-            Pawn* currentPawn = *current;
+        for(auto currentPawn : pawnsIn_)
+        {
+            
             if( currentPawn && currentPawn->getNode() ) 
             {
Index: /code/branches/cpp11_v2/src/modules/objects/eventsystem/EventDispatcher.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/objects/eventsystem/EventDispatcher.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/objects/eventsystem/EventDispatcher.cc	(revision 10821)
@@ -45,6 +45,6 @@
     {
         if (this->isInitialized())
-            for (std::list<BaseObject*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
-                (*it)->destroy();
+            for (auto & elem : this->targets_)
+                (elem)->destroy();
     }
 
@@ -61,6 +61,6 @@
     void EventDispatcher::processEvent(Event& event)
     {
-        for (std::list<BaseObject*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
-            (*it)->processEvent(event);
+        for (auto & elem : this->targets_)
+            (elem)->processEvent(event);
     }
 
@@ -73,8 +73,8 @@
     {
         unsigned int i = 0;
-        for (std::list<BaseObject*>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
+        for (const auto & elem : this->targets_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
Index: /code/branches/cpp11_v2/src/modules/objects/eventsystem/EventFilter.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/objects/eventsystem/EventFilter.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/objects/eventsystem/EventFilter.cc	(revision 10821)
@@ -96,8 +96,8 @@
     {
         unsigned int i = 0;
-        for (std::list<BaseObject*>::const_iterator it = this->sources_.begin(); it != this->sources_.end(); ++it)
+        for (const auto & elem : this->sources_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
@@ -113,8 +113,8 @@
     {
         unsigned int i = 0;
-        for (std::list<EventName*>::const_iterator it = this->names_.begin(); it != this->names_.end(); ++it)
+        for (const auto & elem : this->names_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
Index: /code/branches/cpp11_v2/src/modules/objects/triggers/DistanceMultiTrigger.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/objects/triggers/DistanceMultiTrigger.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/objects/triggers/DistanceMultiTrigger.cc	(revision 10821)
@@ -160,7 +160,7 @@
                 const std::set<WorldEntity*> attached = entity->getAttachedObjects();
                 bool found = false;
-                for(std::set<WorldEntity*>::const_iterator it = attached.begin(); it != attached.end(); it++)
+                for(const auto & elem : attached)
                 {
-                    if((*it)->isA(ClassIdentifier<DistanceTriggerBeacon>::getIdentifier()) && static_cast<DistanceTriggerBeacon*>(*it)->getName() == this->targetName_)
+                    if((elem)->isA(ClassIdentifier<DistanceTriggerBeacon>::getIdentifier()) && static_cast<DistanceTriggerBeacon*>(elem)->getName() == this->targetName_)
                     {
                         found = true;
Index: /code/branches/cpp11_v2/src/modules/objects/triggers/DistanceTrigger.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/objects/triggers/DistanceTrigger.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/objects/triggers/DistanceTrigger.cc	(revision 10821)
@@ -182,7 +182,7 @@
                 const std::set<WorldEntity*> attached = entity->getAttachedObjects();
                 bool found = false;
-                for(std::set<WorldEntity*>::const_iterator it = attached.begin(); it != attached.end(); it++)
+                for(const auto & elem : attached)
                 {
-                    if((*it)->isA(ClassIdentifier<DistanceTriggerBeacon>::getIdentifier()) && static_cast<DistanceTriggerBeacon*>(*it)->getName() == this->targetName_)
+                    if((elem)->isA(ClassIdentifier<DistanceTriggerBeacon>::getIdentifier()) && static_cast<DistanceTriggerBeacon*>(elem)->getName() == this->targetName_)
                     {
                         found = true;
Index: /code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.cc	(revision 10821)
@@ -504,7 +504,7 @@
     bool MultiTrigger::checkAnd(BaseObject* triggerer)
     {
-        for(std::set<TriggerBase*>::iterator it = this->children_.begin(); it != this->children_.end(); ++it)
-        {
-            TriggerBase* trigger = *it;
+        for(auto trigger : this->children_)
+        {
+            
             if(trigger->isMultiTrigger())
             {
@@ -531,7 +531,7 @@
     bool MultiTrigger::checkOr(BaseObject* triggerer)
     {
-        for(std::set<TriggerBase*>::iterator it = this->children_.begin(); it != this->children_.end(); ++it)
-        {
-            TriggerBase* trigger = *it;
+        for(auto trigger : this->children_)
+        {
+            
             if(trigger->isMultiTrigger())
             {
@@ -559,7 +559,7 @@
     {
         bool triggered = false;
-        for(std::set<TriggerBase*>::iterator it = this->children_.begin(); it != this->children_.end(); ++it)
-        {
-            TriggerBase* trigger = *it;
+        for(auto trigger : this->children_)
+        {
+            
             if(triggered)
             {
Index: /code/branches/cpp11_v2/src/modules/objects/triggers/Trigger.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/objects/triggers/Trigger.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/objects/triggers/Trigger.cc	(revision 10821)
@@ -234,7 +234,7 @@
     {
         // Iterate over all sub-triggers.
-        for (std::set<TriggerBase*>::iterator it = this->children_.begin(); it != this->children_.end(); ++it)
-        {
-            if (!(*it)->isActive())
+        for (const auto & elem : this->children_)
+        {
+            if (!(elem)->isActive())
                 return false;
         }
@@ -252,7 +252,7 @@
     {
         // Iterate over all sub-triggers.
-        for (std::set<TriggerBase*>::iterator it = this->children_.begin(); it != this->children_.end(); ++it)
-        {
-            if ((*it)->isActive())
+        for (const auto & elem : this->children_)
+        {
+            if ((elem)->isActive())
                 return true;
         }
@@ -270,9 +270,9 @@
     {
         bool test = false;
-        for (std::set<TriggerBase*>::iterator it = this->children_.begin(); it != this->children_.end(); ++it)
-        {
-            if (test && (*it)->isActive())
+        for (const auto & elem : this->children_)
+        {
+            if (test && (elem)->isActive())
                 return false;
-            if ((*it)->isActive())
+            if ((elem)->isActive())
                 test = true;
         }
Index: /code/branches/cpp11_v2/src/modules/overlays/hud/ChatOverlay.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/overlays/hud/ChatOverlay.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/overlays/hud/ChatOverlay.cc	(revision 10821)
@@ -58,6 +58,6 @@
     ChatOverlay::~ChatOverlay()
     {
-        for (std::set<Timer*>::iterator it = this->timers_.begin(); it != this->timers_.end(); ++it)
-            delete (*it);
+        for (const auto & elem : this->timers_)
+            delete (elem);
     }
 
@@ -92,7 +92,7 @@
         this->text_->setCaption("");
 
-        for (std::list<Ogre::DisplayString>::iterator it = this->messages_.begin(); it != this->messages_.end(); ++it)
+        for (auto & elem : this->messages_)
         {
-            this->text_->setCaption(this->text_->getCaption() + "\n" + (*it));
+            this->text_->setCaption(this->text_->getCaption() + "\n" + (elem));
         }
     }
Index: /code/branches/cpp11_v2/src/modules/overlays/hud/HUDNavigation.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/overlays/hud/HUDNavigation.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/overlays/hud/HUDNavigation.cc	(revision 10821)
@@ -131,8 +131,8 @@
         }
         this->fontName_ = font;
-        for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)
-        {
-            if (it->second.text_ != nullptr)
-                it->second.text_->setFontName(this->fontName_);
+        for (auto & elem : this->activeObjectList_)
+        {
+            if (elem.second.text_ != nullptr)
+                elem.second.text_->setFontName(this->fontName_);
         }
     }
@@ -151,8 +151,8 @@
         }
         this->textSize_ = size;
-        for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it!=this->activeObjectList_.end(); ++it)
-        {
-            if (it->second.text_)
-                it->second.text_->setCharHeight(size);
+        for (auto & elem : this->activeObjectList_)
+        {
+            if (elem.second.text_)
+                elem.second.text_->setCharHeight(size);
         }
     }
@@ -186,6 +186,6 @@
         const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix();
 
-        for (std::list<std::pair<RadarViewable*, unsigned int>>::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt)
-        listIt->second = (int)((listIt->first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f);
+        for (auto & elem : this->sortedObjectList_)
+        elem.second = (int)((elem.first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f);
 
         this->sortedObjectList_.sort(compareDistance);
@@ -531,16 +531,16 @@
         float yScale = this->getActualSize().y;
 
-        for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)
-        {
-            if (it->second.health_ != nullptr)
-                it->second.health_->setDimensions(this->healthMarkerSize_ * xScale, this->healthMarkerSize_ * yScale);
-            if (it->second.healthLevel_ != nullptr)
-                it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * xScale, this->healthLevelMarkerSize_ * yScale);
-            if (it->second.panel_ != nullptr)
-                it->second.panel_->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);
-            if (it->second.text_ != nullptr)
-                it->second.text_->setCharHeight(this->textSize_ * yScale);
-            if (it->second.target_ != nullptr)
-                it->second.target_->setDimensions(this->aimMarkerSize_ * xScale, this->aimMarkerSize_ * yScale);
+        for (auto & elem : this->activeObjectList_)
+        {
+            if (elem.second.health_ != nullptr)
+                elem.second.health_->setDimensions(this->healthMarkerSize_ * xScale, this->healthMarkerSize_ * yScale);
+            if (elem.second.healthLevel_ != nullptr)
+                elem.second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * xScale, this->healthLevelMarkerSize_ * yScale);
+            if (elem.second.panel_ != nullptr)
+                elem.second.panel_->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);
+            if (elem.second.text_ != nullptr)
+                elem.second.text_->setCharHeight(this->textSize_ * yScale);
+            if (elem.second.target_ != nullptr)
+                elem.second.target_->setDimensions(this->aimMarkerSize_ * xScale, this->aimMarkerSize_ * yScale);
         }
     }
@@ -670,8 +670,8 @@
     {
         const std::set<RadarViewable*>& respawnObjects = this->getOwner()->getScene()->getRadar()->getRadarObjects();
-        for (std::set<RadarViewable*>::const_iterator it = respawnObjects.begin(); it != respawnObjects.end(); ++it)
-        {
-            if (!(*it)->isHumanShip_)
-            this->addObject(*it);
+        for (const auto & respawnObject : respawnObjects)
+        {
+            if (!(respawnObject)->isHumanShip_)
+            this->addObject(respawnObject);
         }
     }
Index: /code/branches/cpp11_v2/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/overlays/hud/HUDRadar.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/overlays/hud/HUDRadar.cc	(revision 10821)
@@ -92,8 +92,7 @@
             Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->map3DBack_);
 
-            for (std::map<RadarViewable*,Ogre::PanelOverlayElement*>::iterator it = this->radarObjects_.begin();
-                it != this->radarObjects_.end(); ++it)
-            {
-                Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second);
+            for (auto & elem : this->radarObjects_)
+            {
+                Ogre::OverlayManager::getSingleton().destroyOverlayElement(elem.second);
             }
         }
Index: /code/branches/cpp11_v2/src/modules/overlays/stats/Scoreboard.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/overlays/stats/Scoreboard.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/overlays/stats/Scoreboard.cc	(revision 10821)
@@ -60,6 +60,6 @@
         SUPER(Scoreboard, changedVisibility);
 
-        for (unsigned int i = 0; i < this->lines_.size(); ++i)
-            this->lines_[i]->changedVisibility();
+        for (auto & elem : this->lines_)
+            elem->changedVisibility();
     }
 
@@ -94,9 +94,9 @@
 
         unsigned int index = 0;
-        for (std::map<PlayerInfo*, Player>::const_iterator it = playerList.begin(); it != playerList.end(); ++it)
+        for (const auto & elem : playerList)
         {
-            this->lines_[index]->setPlayerName(multi_cast<std::string>(it->first->getName()));
-            this->lines_[index]->setScore(multi_cast<std::string>(it->second.frags_));
-            this->lines_[index]->setDeaths(multi_cast<std::string>(it->second.killed_));
+            this->lines_[index]->setPlayerName(multi_cast<std::string>(elem.first->getName()));
+            this->lines_[index]->setScore(multi_cast<std::string>(elem.second.frags_));
+            this->lines_[index]->setDeaths(multi_cast<std::string>(elem.second.killed_));
             index++;
         }
Index: /code/branches/cpp11_v2/src/modules/pickup/PickupCollection.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/pickup/PickupCollection.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/pickup/PickupCollection.cc	(revision 10821)
@@ -68,8 +68,8 @@
     {
         // Destroy all Pickupables constructing this PickupCollection.
-        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
-        {
-            (*it)->wasRemovedFromCollection();
-            (*it)->destroy();
+        for(auto & elem : this->pickups_)
+        {
+            (elem)->wasRemovedFromCollection();
+            (elem)->destroy();
         }
         this->pickups_.clear();
@@ -99,6 +99,6 @@
         this->processingUsed_ = true;
         // Change used for all Pickupables this PickupCollection consists of.
-        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
-            (*it)->setUsed(this->isUsed());
+        for(auto & elem : this->pickups_)
+            (elem)->setUsed(this->isUsed());
 
         this->processingUsed_ = false;
@@ -119,9 +119,9 @@
         size_t numPickupsEnabled = 0;
         size_t numPickupsInUse = 0;
-        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
-        {
-            if ((*it)->isEnabled())
+        for(auto & elem : this->pickups_)
+        {
+            if ((elem)->isEnabled())
                 ++numPickupsEnabled;
-            if ((*it)->isUsed())
+            if ((elem)->isUsed())
                 ++numPickupsInUse;
         }
@@ -146,10 +146,10 @@
 
         // Change the PickupCarrier for all Pickupables this PickupCollection consists of.
-        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
+        for(auto & elem : this->pickups_)
         {
             if(this->getCarrier() == nullptr)
-                (*it)->setCarrier(nullptr);
+                (elem)->setCarrier(nullptr);
             else
-                (*it)->setCarrier(this->getCarrier()->getTarget(*it));
+                (elem)->setCarrier(this->getCarrier()->getTarget(elem));
         }
     }
@@ -186,7 +186,7 @@
         // If at least all the enabled pickups of this PickupCollection are no longer picked up.
         bool isOnePickupEnabledAndPickedUp = false;
-        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
-        {
-            if ((*it)->isEnabled() && (*it)->isPickedUp())
+        for(auto & elem : this->pickups_)
+        {
+            if ((elem)->isEnabled() && (elem)->isPickedUp())
             {
                 isOnePickupEnabledAndPickedUp = true;
@@ -208,7 +208,7 @@
     bool PickupCollection::isTarget(const PickupCarrier* carrier) const
     {
-        for(std::list<CollectiblePickup*>::const_iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
-        {
-            if(!carrier->isTarget(*it))
+        for(const auto & elem : this->pickups_)
+        {
+            if(!carrier->isTarget(elem))
                 return false;
         }
Index: /code/branches/cpp11_v2/src/modules/pickup/PickupManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/pickup/PickupManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/pickup/PickupManager.cc	(revision 10821)
@@ -91,6 +91,6 @@
 
         // Destroying all the PickupInventoryContainers that are still there.
-        for(std::map<uint32_t, PickupInventoryContainer*>::iterator it = this->pickupInventoryContainers_.begin(); it != this->pickupInventoryContainers_.end(); it++)
-            delete it->second;
+        for(auto & elem : this->pickupInventoryContainers_)
+            delete elem.second;
         this->pickupInventoryContainers_.clear();
 
Index: /code/branches/cpp11_v2/src/modules/pickup/items/MetaPickup.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/pickup/items/MetaPickup.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/pickup/items/MetaPickup.cc	(revision 10821)
@@ -118,7 +118,7 @@
                 std::set<Pickupable*> pickups = carrier->getPickups();
                 // Iterate over all Pickupables of the PickupCarrier.
-                for(std::set<Pickupable*>::iterator it = pickups.begin(); it != pickups.end(); it++)
+                for(auto pickup : pickups)
                 {
-                    Pickupable* pickup = (*it);
+                    
                     if(pickup == nullptr || pickup == this)
                         continue;
Index: /code/branches/cpp11_v2/src/modules/pong/Pong.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/pong/Pong.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/pong/Pong.cc	(revision 10821)
@@ -145,10 +145,10 @@
 
             // If one of the bats is missing, create it. Apply the template for the bats as specified in the centerpoint.
-            for (size_t i = 0; i < 2; ++i)
+            for (auto & elem : this->bat_)
             {
-                if (this->bat_[i] == nullptr)
+                if (elem == nullptr)
                 {
-                    this->bat_[i] = new PongBat(this->center_->getContext());
-                    this->bat_[i]->addTemplate(this->center_->getBattemplate());
+                    elem = new PongBat(this->center_->getContext());
+                    elem->addTemplate(this->center_->getBattemplate());
                 }
             }
@@ -211,11 +211,11 @@
     {
         // first spawn human players to assign always the left bat to the player in singleplayer
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if (it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_))
-                this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+            if (elem.first->isHumanPlayer() && (elem.first->isReadyToSpawn() || this->bForceSpawn_))
+                this->spawnPlayer(elem.first);
         // now spawn bots
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if (!it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_))
-                this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+            if (!elem.first->isHumanPlayer() && (elem.first->isReadyToSpawn() || this->bForceSpawn_))
+                this->spawnPlayer(elem.first);
     }
 
Index: /code/branches/cpp11_v2/src/modules/pong/PongAI.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/pong/PongAI.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/pong/PongAI.cc	(revision 10821)
@@ -77,6 +77,6 @@
     PongAI::~PongAI()
     {
-        for (std::list<std::pair<Timer*, char>>::iterator it = this->reactionTimers_.begin(); it != this->reactionTimers_.end(); ++it)
-            it->first->destroy();
+        for (auto & elem : this->reactionTimers_)
+            elem.first->destroy();
     }
 
Index: /code/branches/cpp11_v2/src/modules/questsystem/GlobalQuest.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/questsystem/GlobalQuest.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/questsystem/GlobalQuest.cc	(revision 10821)
@@ -94,6 +94,6 @@
 
         // Iterate through all players possessing this Quest.
-        for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
-            QuestEffect::invokeEffects(*it, this->getFailEffectList());
+        for(const auto & elem : players_)
+            QuestEffect::invokeEffects(elem, this->getFailEffectList());
 
         return true;
@@ -119,6 +119,6 @@
 
         // Iterate through all players possessing the Quest.
-        for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
-            QuestEffect::invokeEffects(*it, this->getCompleteEffectList());
+        for(const auto & elem : players_)
+            QuestEffect::invokeEffects(elem, this->getCompleteEffectList());
 
         Quest::complete(player);
@@ -242,8 +242,8 @@
     {
         int i = index;
-        for (std::list<QuestEffect*>::const_iterator effect = this->rewards_.begin(); effect != this->rewards_.end(); ++effect)
+        for (const auto & elem : this->rewards_)
         {
             if(i == 0)
-               return *effect;
+               return elem;
 
             i--;
Index: /code/branches/cpp11_v2/src/modules/questsystem/Quest.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/questsystem/Quest.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/questsystem/Quest.cc	(revision 10821)
@@ -190,8 +190,8 @@
 
         // Iterate through all subquests.
-        for (std::list<Quest*>::const_iterator subQuest = this->subQuests_.begin(); subQuest != this->subQuests_.end(); ++subQuest)
+        for (const auto & elem : this->subQuests_)
         {
             if(i == 0) // We're counting down...
-               return *subQuest;
+               return elem;
 
             i--;
@@ -214,8 +214,8 @@
 
         // Iterate through all QuestHints.
-        for (std::list<QuestHint*>::const_iterator hint = this->hints_.begin(); hint != this->hints_.end(); ++hint)
+        for (const auto & elem : this->hints_)
         {
             if(i == 0) // We're counting down...
-               return *hint;
+               return elem;
 
             i--;
@@ -237,8 +237,8 @@
 
         // Iterate through all fail QuestEffects.
-        for (std::list<QuestEffect*>::const_iterator effect = this->failEffects_.begin(); effect != this->failEffects_.end(); ++effect)
+        for (const auto & elem : this->failEffects_)
         {
             if(i == 0) // We're counting down...
-               return *effect;
+               return elem;
 
             i--;
@@ -260,8 +260,8 @@
 
         // Iterate through all complete QuestEffects.
-        for (std::list<QuestEffect*>::const_iterator effect = this->completeEffects_.begin(); effect != this->completeEffects_.end(); ++effect)
+        for (const auto & elem : this->completeEffects_)
         {
             if(i == 0) // We're counting down...
-               return *effect;
+               return elem;
 
             i--;
Index: /code/branches/cpp11_v2/src/modules/questsystem/QuestEffect.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/questsystem/QuestEffect.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/questsystem/QuestEffect.cc	(revision 10821)
@@ -74,6 +74,6 @@
         orxout(verbose, context::quests) << "Invoking QuestEffects on player: " << player << " ."  << endl;
 
-        for (std::list<QuestEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++)
-            temp = temp && (*effect)->invoke(player);
+        for (auto & effects_effect : effects)
+            temp = temp && (effects_effect)->invoke(player);
 
         return temp;
Index: /code/branches/cpp11_v2/src/modules/questsystem/QuestEffectBeacon.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/questsystem/QuestEffectBeacon.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/questsystem/QuestEffectBeacon.cc	(revision 10821)
@@ -236,8 +236,8 @@
     {
         int i = index;
-        for (std::list<QuestEffect*>::const_iterator effect = this->effects_.begin(); effect != this->effects_.end(); ++effect)
+        for (const auto & elem : this->effects_)
         {
             if(i == 0)
-               return *effect;
+               return elem;
 
             i--;
Index: /code/branches/cpp11_v2/src/modules/questsystem/QuestListener.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/questsystem/QuestListener.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/questsystem/QuestListener.cc	(revision 10821)
@@ -97,7 +97,7 @@
     /* static */ void QuestListener::advertiseStatusChange(std::list<QuestListener*> & listeners, const std::string & status)
     {
-        for (std::list<QuestListener*>::iterator it = listeners.begin(); it != listeners.end(); ++it) // Iterate through all QuestListeners
-        {
-            QuestListener* listener = *it;
+        for (auto listener : listeners) // Iterate through all QuestListeners
+        {
+            
             if(listener->getMode() == status || listener->getMode() == QuestListener::ALL) // Check whether the status change affects the give QuestListener.
                 listener->execute();
Index: /code/branches/cpp11_v2/src/modules/questsystem/QuestManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/questsystem/QuestManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/questsystem/QuestManager.cc	(revision 10821)
@@ -235,7 +235,7 @@
     {
         int numQuests = 0;
-        for(std::map<std::string, Quest*>::iterator it = this->questMap_.begin(); it != this->questMap_.end(); it++)
-        {
-            if(it->second->getParentQuest() == nullptr && !it->second->isInactive(player))
+        for(auto & elem : this->questMap_)
+        {
+            if(elem.second->getParentQuest() == nullptr && !elem.second->isInactive(player))
                 numQuests++;
         }
@@ -255,8 +255,8 @@
     Quest* QuestManager::getRootQuest(PlayerInfo* player, int index)
     {
-        for(std::map<std::string, Quest*>::iterator it = this->questMap_.begin(); it != this->questMap_.end(); it++)
-        {
-            if(it->second->getParentQuest() == nullptr && !it->second->isInactive(player) && index-- == 0)
-                return it->second;
+        for(auto & elem : this->questMap_)
+        {
+            if(elem.second->getParentQuest() == nullptr && !elem.second->isInactive(player) && index-- == 0)
+                return elem.second;
         }
         return nullptr;
@@ -280,7 +280,7 @@
         std::list<Quest*> quests = quest->getSubQuestList();
         int numQuests = 0;
-        for(std::list<Quest*>::iterator it = quests.begin(); it != quests.end(); it++)
-        {
-            if(!(*it)->isInactive(player))
+        for(auto & quest : quests)
+        {
+            if(!(quest)->isInactive(player))
                 numQuests++;
         }
@@ -304,8 +304,8 @@
 
         std::list<Quest*> quests = quest->getSubQuestList();
-        for(std::list<Quest*>::iterator it = quests.begin(); it != quests.end(); it++)
-        {
-            if(!(*it)->isInactive(player) && index-- == 0)
-                return *it;
+        for(auto & quest : quests)
+        {
+            if(!(quest)->isInactive(player) && index-- == 0)
+                return quest;
         }
         return nullptr;
@@ -326,7 +326,7 @@
         std::list<QuestHint*> hints = quest->getHintsList();
         int numHints = 0;
-        for(std::list<QuestHint*>::iterator it = hints.begin(); it != hints.end(); it++)
-        {
-            if((*it)->isActive(player))
+        for(auto & hint : hints)
+        {
+            if((hint)->isActive(player))
                 numHints++;
         }
@@ -349,8 +349,8 @@
     {
         std::list<QuestHint*> hints = quest->getHintsList();
-        for(std::list<QuestHint*>::iterator it = hints.begin(); it != hints.end(); it++)
-        {
-            if((*it)->isActive(player) && index-- == 0)
-                return *it;
+        for(auto & hint : hints)
+        {
+            if((hint)->isActive(player) && index-- == 0)
+                return hint;
         }
         return nullptr;
Index: /code/branches/cpp11_v2/src/modules/questsystem/effects/AddReward.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/questsystem/effects/AddReward.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/questsystem/effects/AddReward.cc	(revision 10821)
@@ -84,8 +84,8 @@
     {
         int i = index;
-        for (std::list<Rewardable*>::const_iterator reward = this->rewards_.begin(); reward != this->rewards_.end(); ++reward)
+        for (const auto & elem : this->rewards_)
         {
             if(i == 0)
-               return *reward;
+               return elem;
             i--;
         }
@@ -106,6 +106,6 @@
 
         bool temp = true;
-        for ( std::list<Rewardable*>::iterator reward = this->rewards_.begin(); reward != this->rewards_.end(); ++reward )
-            temp = temp && (*reward)->reward(player);
+        for (auto & elem : this->rewards_)
+            temp = temp && (elem)->reward(player);
 
         orxout(verbose, context::quests) << "Rewardable successfully added to player." << player << " ." << endl;
Index: /code/branches/cpp11_v2/src/modules/tetris/Tetris.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/tetris/Tetris.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/tetris/Tetris.cc	(revision 10821)
@@ -104,6 +104,6 @@
         }
 
-        for (std::list<StrongPtr<TetrisStone>>::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
-            (*it)->destroy();
+        for (auto & elem : this->stones_)
+            (elem)->destroy();
         this->stones_.clear();
     }
@@ -341,7 +341,7 @@
     {
         // Spawn a human player.
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if (it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_))
-                this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+            if (elem.first->isHumanPlayer() && (elem.first->isReadyToSpawn() || this->bForceSpawn_))
+                this->spawnPlayer(elem.first);
     }
     
@@ -502,8 +502,8 @@
         }
       // adjust height of stones above the deleted row //TODO: check if this could be a source of a bug.
-        for(std::list<StrongPtr<TetrisStone>>::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
-        {
-            if(static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize()) > row)
-                (*it)->setPosition((*it)->getPosition()-Vector3(0,10,0));
+        for(auto & elem : this->stones_)
+        {
+            if(static_cast<unsigned int>(((elem)->getPosition().y - 5)/this->center_->getStoneSize()) > row)
+                (elem)->setPosition((elem)->getPosition()-Vector3(0,10,0));
         }
 
Index: /code/branches/cpp11_v2/src/modules/tetris/TetrisBrick.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/tetris/TetrisBrick.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/tetris/TetrisBrick.cc	(revision 10821)
@@ -239,9 +239,9 @@
     {
         assert(this->tetris_);
-        for(unsigned int i = 0; i < this->brickStones_.size(); i++)
-        {
-            this->brickStones_[i]->detachFromParent();
-            this->brickStones_[i]->attachToParent(center);
-            this->brickStones_[i]->setPosition(this->getPosition()+this->tetris_->rotateVector(this->brickStones_[i]->getPosition(),this->rotationCount_ ));
+        for(auto & elem : this->brickStones_)
+        {
+            elem->detachFromParent();
+            elem->attachToParent(center);
+            elem->setPosition(this->getPosition()+this->tetris_->rotateVector(elem->getPosition(),this->rotationCount_ ));
         }
         this->brickStones_.clear();
Index: /code/branches/cpp11_v2/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- /code/branches/cpp11_v2/src/modules/towerdefense/TowerDefense.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/modules/towerdefense/TowerDefense.cc	(revision 10821)
@@ -183,8 +183,8 @@
             en1->lookAt(waypoints_.at(1)->getPosition() + offset_);
 
-            for (unsigned int i = 0; i < waypoints_.size(); ++ i)
+            for (auto & elem : waypoints_)
             {
                 orxonox::WeakPtr<MovableEntity> waypoint = new MovableEntity(this->center_->getContext());
-                waypoint->setPosition(waypoints_.at(i)->getPosition() + offset_);
+                waypoint->setPosition(elem->getPosition() + offset_);
                 controller->addWaypoint(waypoint);
             }
Index: /code/branches/cpp11_v2/src/orxonox/Level.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/Level.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/Level.cc	(revision 10821)
@@ -106,8 +106,8 @@
     void Level::networkCallbackTemplatesChanged()
     {
-        for( std::set<std::string>::iterator it = this->networkTemplateNames_.begin(); it!=this->networkTemplateNames_.end(); ++it )
-        {
-            assert(Template::getTemplate(*it));
-            Template::getTemplate(*it)->applyOn(this);
+        for(const auto & elem : this->networkTemplateNames_)
+        {
+            assert(Template::getTemplate(elem));
+            Template::getTemplate(elem)->applyOn(this);
         }
     }
@@ -135,6 +135,6 @@
         //       objects alive when ~Level is called. This is the reason why we cannot directly destroy() the Plugins - instead we need
         //       to call destroyLater() to ensure that no instances from this plugin exist anymore.
-        for (std::list<PluginReference*>::iterator it = this->plugins_.begin(); it != this->plugins_.end(); ++it)
-            (*it)->destroyLater();
+        for (auto & elem : this->plugins_)
+            (elem)->destroyLater();
         this->plugins_.clear();
     }
@@ -173,8 +173,8 @@
     {
         unsigned int i = 0;
-        for (std::list<BaseObject*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+        for (const auto & elem : this->objects_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
Index: /code/branches/cpp11_v2/src/orxonox/LevelInfo.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/LevelInfo.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/LevelInfo.cc	(revision 10821)
@@ -107,6 +107,6 @@
         SubString substr = SubString(tags, ",", " "); // Split the string into tags.
         const std::vector<std::string>& strings = substr.getAllStrings();
-        for (std::vector<std::string>::const_iterator it = strings.begin(); it != strings.end(); it++)
-            this->addTag(*it, false);
+        for (const auto & strings_it : strings)
+            this->addTag(strings_it, false);
 
         this->tagsUpdated();
@@ -122,6 +122,6 @@
         SubString substr = SubString(ships, ",", " "); // Split the string into tags.
         const std::vector<std::string>& strings = substr.getAllStrings();
-        for(std::vector<std::string>::const_iterator it = strings.begin(); it != strings.end(); it++)
-            this->addStartingShip(*it, false);
+        for(const auto & strings_it : strings)
+            this->addStartingShip(strings_it, false);
 
         this->startingshipsUpdated();
Index: /code/branches/cpp11_v2/src/orxonox/LevelManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/LevelManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/LevelManager.cc	(revision 10821)
@@ -175,6 +175,6 @@
             this->levels_.front()->setActive(true);
             // Make every player enter the newly activated level.
-            for (std::map<unsigned int, PlayerInfo*>::const_iterator it = PlayerManager::getInstance().getClients().begin(); it != PlayerManager::getInstance().getClients().end(); ++it)
-                this->levels_.front()->playerEntered(it->second);
+            for (const auto & elem : PlayerManager::getInstance().getClients())
+                this->levels_.front()->playerEntered(elem.second);
         }
     }
Index: /code/branches/cpp11_v2/src/orxonox/Scene.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/Scene.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/Scene.cc	(revision 10821)
@@ -220,9 +220,8 @@
         {
             // Remove all WorldEntities and shove them to the queue since they would still like to be in a physical world.
-            for (std::set<WorldEntity*>::const_iterator it = this->physicalObjects_.begin();
-                it != this->physicalObjects_.end(); ++it)
+            for (const auto & elem : this->physicalObjects_)
             {
-                this->physicalWorld_->removeRigidBody((*it)->physicalBody_);
-                this->physicalObjectQueue_.insert(*it);
+                this->physicalWorld_->removeRigidBody((elem)->physicalBody_);
+                this->physicalObjectQueue_.insert(elem);
             }
             this->physicalObjects_.clear();
@@ -256,9 +255,8 @@
             {
                 // Add all scheduled WorldEntities
-                for (std::set<WorldEntity*>::const_iterator it = this->physicalObjectQueue_.begin();
-                    it != this->physicalObjectQueue_.end(); ++it)
+                for (const auto & elem : this->physicalObjectQueue_)
                 {
-                    this->physicalWorld_->addRigidBody((*it)->physicalBody_);
-                    this->physicalObjects_.insert(*it);
+                    this->physicalWorld_->addRigidBody((elem)->physicalBody_);
+                    this->physicalObjects_.insert(elem);
                 }
                 this->physicalObjectQueue_.clear();
@@ -321,8 +319,8 @@
     {
         unsigned int i = 0;
-        for (std::list<BaseObject*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+        for (const auto & elem : this->objects_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
Index: /code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc	(revision 10821)
@@ -65,11 +65,10 @@
         {
             // Delete all children
-            for (std::map<CollisionShape*, btCollisionShape*>::iterator it = this->attachedShapes_.begin();
-                it != this->attachedShapes_.end(); ++it)
+            for (auto & elem : this->attachedShapes_)
             {
                 // make sure that the child doesn't want to detach itself --> speedup because of the missing update
-                it->first->notifyDetached();
-                it->first->destroy();
-                if (this->collisionShape_ == it->second)
+                elem.first->notifyDetached();
+                elem.first->destroy();
+                if (this->collisionShape_ == elem.second)
                     this->collisionShape_ = nullptr; // don't destroy it twice
             }
@@ -247,8 +246,8 @@
     {
         unsigned int i = 0;
-        for (std::map<CollisionShape*, btCollisionShape*>::const_iterator it = this->attachedShapes_.begin(); it != this->attachedShapes_.end(); ++it)
+        for (const auto & elem : this->attachedShapes_)
         {
             if (i == index)
-                return it->first;
+                return elem.first;
             ++i;
         }
@@ -267,6 +266,6 @@
         std::vector<CollisionShape*> shapes;
         // Iterate through all attached CollisionShapes and add them to the list of shapes.
-        for(std::map<CollisionShape*, btCollisionShape*>::iterator it = this->attachedShapes_.begin(); it != this->attachedShapes_.end(); it++)
-            shapes.push_back(it->first);
+        for(auto & elem : this->attachedShapes_)
+            shapes.push_back(elem.first);
 
         // Delete the compound shape and create a new one.
@@ -275,7 +274,7 @@
 
         // Re-attach all CollisionShapes.
-        for(std::vector<CollisionShape*>::iterator it = shapes.begin(); it != shapes.end(); it++)
-        {
-            CollisionShape* shape = *it;
+        for(auto shape : shapes)
+        {
+            
             shape->setScale3D(this->getScale3D());
             // Only actually attach if we didn't pick a CompoundCollisionShape with no content.
Index: /code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc	(revision 10821)
@@ -440,8 +440,8 @@
                 if(newMaster->slaves_.size() > this->maxFormationSize_) continue;
 
-                for(std::vector<FormationController*>::iterator itSlave = this->slaves_.begin(); itSlave != this->slaves_.end(); itSlave++)
+                for(auto & elem : this->slaves_)
                 {
-                    (*itSlave)->myMaster_ = newMaster;
-                    newMaster->slaves_.push_back(*itSlave);
+                    (elem)->myMaster_ = newMaster;
+                    newMaster->slaves_.push_back(elem);
                 }
                 this->slaves_.clear();
@@ -486,5 +486,5 @@
             int i = 1;
 
-            for(std::vector<FormationController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
+            for(auto & elem : slaves_)
             {
                 pos = Vector3::ZERO;
@@ -497,6 +497,6 @@
                     dest+=FORMATION_LENGTH*(orient*WorldEntity::BACK);
                 }
-                (*it)->setTargetOrientation(orient);
-                (*it)->setTargetPosition(pos);
+                (elem)->setTargetOrientation(orient);
+                (elem)->setTargetPosition(pos);
                 left=!left;
             }
@@ -569,8 +569,8 @@
         if(this->state_ != MASTER) return;
 
-        for(std::vector<FormationController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
-        {
-            (*it)->state_ = FREE;
-            (*it)->myMaster_ = nullptr;
+        for(auto & elem : slaves_)
+        {
+            (elem)->state_ = FREE;
+            (elem)->myMaster_ = nullptr;
         }
         this->slaves_.clear();
@@ -584,10 +584,10 @@
         if(this->state_ != MASTER) return;
 
-        for(std::vector<FormationController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
-        {
-            (*it)->state_ = FREE;
-            (*it)->forceFreedom();
-            (*it)->targetPosition_ = this->targetPosition_;
-            (*it)->bShooting_ = true;
+        for(auto & elem : slaves_)
+        {
+            (elem)->state_ = FREE;
+            (elem)->forceFreedom();
+            (elem)->targetPosition_ = this->targetPosition_;
+            (elem)->bShooting_ = true;
 //             (*it)->getControllableEntity()->fire(0);// fire once for fun
         }
@@ -650,7 +650,7 @@
             this->slaves_.push_back(this->myMaster_);
             //set this as new master
-            for(std::vector<FormationController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
-            {
-                 (*it)->myMaster_=this;
+            for(auto & elem : slaves_)
+            {
+                 (elem)->myMaster_=this;
             }
             this->myMaster_=nullptr;
@@ -694,9 +694,9 @@
         if (this->state_ == MASTER)
         {
-            for(std::vector<FormationController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
-            {
-                 (*it)->formationMode_ = val;
+            for(auto & elem : slaves_)
+            {
+                 (elem)->formationMode_ = val;
                  if (val == ATTACK)
-                     (*it)->forgetTarget();
+                     (elem)->forgetTarget();
             }
         }
Index: /code/branches/cpp11_v2/src/orxonox/controllers/WaypointController.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/controllers/WaypointController.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/controllers/WaypointController.cc	(revision 10821)
@@ -44,8 +44,8 @@
     WaypointController::~WaypointController()
     {
-        for (size_t i = 0; i < this->waypoints_.size(); ++i)
+        for (auto & elem : this->waypoints_)
         {
-            if(this->waypoints_[i])
-                this->waypoints_[i]->destroy();
+            if(elem)
+                elem->destroy();
         }
     }
Index: /code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc	(revision 10821)
@@ -251,6 +251,6 @@
 
         // delete states
-        for (size_t i = 0; i < states.size(); ++i)
-            delete states[i];
+        for (auto & state : states)
+            delete state;
     }
 
Index: /code/branches/cpp11_v2/src/orxonox/gametypes/Dynamicmatch.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/gametypes/Dynamicmatch.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/gametypes/Dynamicmatch.cc	(revision 10821)
@@ -405,9 +405,9 @@
     void Dynamicmatch::rewardPig()
     {
-        for (std::map< PlayerInfo*, int >::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it) //durch alle Spieler iterieren und alle piggys finden
-        {
-            if (it->second==piggy)//Spieler mit der Pig-party frags++
-            {
-                 this->playerScored(it->first);
+        for (auto & elem : this->playerParty_) //durch alle Spieler iterieren und alle piggys finden
+        {
+            if (elem.second==piggy)//Spieler mit der Pig-party frags++
+            {
+                 this->playerScored(elem.first);
             }
         }
@@ -422,9 +422,9 @@
 
                 std::set<WorldEntity*> pawnAttachments = pawn->getAttachedObjects();
-                for (std::set<WorldEntity*>::iterator it = pawnAttachments.begin(); it != pawnAttachments.end(); ++it)
-                {
-                    if ((*it)->isA(Class(TeamColourable)))
+                for (const auto & pawnAttachment : pawnAttachments)
+                {
+                    if ((pawnAttachment)->isA(Class(TeamColourable)))
                     {
-                        TeamColourable* tc = orxonox_cast<TeamColourable*>(*it);
+                        TeamColourable* tc = orxonox_cast<TeamColourable*>(pawnAttachment);
                         tc->setTeamColour(this->partyColours_[it_player->second]);
                     }
@@ -441,11 +441,11 @@
             if (tutorial) // Announce selectionphase
             {
-             for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
-                {
-                    if (!it->first)//in order to catch nullpointer
+             for (auto & elem : this->playerParty_)
+                {
+                    if (!elem.first)//in order to catch nullpointer
                         continue;
-                    if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                    if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                         continue;
-                    this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",it->first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
+                    this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",elem.first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
                 }
             }
@@ -456,26 +456,26 @@
              if(tutorial&&(!notEnoughKillers)&&(!notEnoughChasers)) //Selection phase over
              {
-                  for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
+                  for (auto & elem : this->playerParty_)
                   {
-                       if (!it->first)//in order to catch nullpointer
+                       if (!elem.first)//in order to catch nullpointer
                            continue;
-                       if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                       if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                            continue;
-                       else if (it->second==chaser)
+                       else if (elem.second==chaser)
                        {
                            if (numberOf[killer]>0)
-                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible. Defend yourself against the killers.",it->first->getClientID(),partyColours_[piggy]);
+                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible. Defend yourself against the killers.",elem.first->getClientID(),partyColours_[piggy]);
                            else
-                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible.",it->first->getClientID(),partyColours_[piggy]);
+                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible.",elem.first->getClientID(),partyColours_[piggy]);
                            //this->gtinfo_->sendFadingMessage("You're now a chaser.",it->first->getClientID());
                        }
-                       else if (it->second==piggy)
-                       {
-                           this->gtinfo_->sendStaticMessage("Either hide or shoot a chaser.",it->first->getClientID(),partyColours_[chaser]);
+                       else if (elem.second==piggy)
+                       {
+                           this->gtinfo_->sendStaticMessage("Either hide or shoot a chaser.",elem.first->getClientID(),partyColours_[chaser]);
                            //this->gtinfo_->sendFadingMessage("You're now a victim.",it->first->getClientID());
                        }
-                       else if (it->second==killer)
-                       {
-                           this->gtinfo_->sendStaticMessage("Take the chasers down.",it->first->getClientID(),partyColours_[chaser]);
+                       else if (elem.second==killer)
+                       {
+                           this->gtinfo_->sendStaticMessage("Take the chasers down.",elem.first->getClientID(),partyColours_[chaser]);
                            //this->gtinfo_->sendFadingMessage("You're now a killer.",it->first->getClientID());
                        }
@@ -490,11 +490,11 @@
             if (tutorial) // Announce selectionphase
             {
-             for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
-                {
-                    if (!it->first)//in order to catch nullpointer
+             for (auto & elem : this->playerParty_)
+                {
+                    if (!elem.first)//in order to catch nullpointer
                         continue;
-                    if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                    if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                         continue;
-                    this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",it->first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
+                    this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",elem.first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
                 }
             }
@@ -505,26 +505,26 @@
             if(tutorial&&(!notEnoughPigs)&&(!notEnoughChasers)) //Selection phase over
              {
-                  for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
+                  for (auto & elem : this->playerParty_)
                   {
-                       if (!it->first)
+                       if (!elem.first)
                            continue;
-                       if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                       if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                            continue;
-                       else if (it->second==chaser)
+                       else if (elem.second==chaser)
                        {
                            if (numberOf[killer]>0)
-                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible. Defend yourself against the killers.",it->first->getClientID(),partyColours_[piggy]);
+                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible. Defend yourself against the killers.",elem.first->getClientID(),partyColours_[piggy]);
                            else
-                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible.",it->first->getClientID(),partyColours_[piggy]);
+                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible.",elem.first->getClientID(),partyColours_[piggy]);
                            //this->gtinfo_->sendFadingMessage("You're now a chaser.",it->first->getClientID());
                        }
-                       else if (it->second==piggy)
-                       {
-                           this->gtinfo_->sendStaticMessage("Either hide or shoot a chaser.",it->first->getClientID(),partyColours_[piggy]);
+                       else if (elem.second==piggy)
+                       {
+                           this->gtinfo_->sendStaticMessage("Either hide or shoot a chaser.",elem.first->getClientID(),partyColours_[piggy]);
                            //this->gtinfo_->sendFadingMessage("You're now a victim.",it->first->getClientID());
                        }
-                       else if (it->second==killer)
-                       {
-                           this->gtinfo_->sendStaticMessage("Take the chasers down.",it->first->getClientID(),partyColours_[piggy]);
+                       else if (elem.second==killer)
+                       {
+                           this->gtinfo_->sendStaticMessage("Take the chasers down.",elem.first->getClientID(),partyColours_[piggy]);
                            //this->gtinfo_->sendFadingMessage("You're now a killer.",it->first->getClientID());
                        }
@@ -540,11 +540,11 @@
             if (tutorial) // Announce selectionphase
             {
-             for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
-                {
-                    if (!it->first)//in order to catch nullpointer
+             for (auto & elem : this->playerParty_)
+                {
+                    if (!elem.first)//in order to catch nullpointer
                         continue;
-                    if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                    if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                         continue;
-                    this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",it->first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
+                    this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",elem.first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
                 }
             }
@@ -555,26 +555,26 @@
              if(tutorial&&(!notEnoughPigs)&&(!notEnoughKillers)) //Selection phase over
              {
-                  for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
+                  for (auto & elem : this->playerParty_)
                   {
-                       if (!it->first)
+                       if (!elem.first)
                            continue;
-                       if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                       if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                            continue;
-                       else if (it->second==chaser)
+                       else if (elem.second==chaser)
                        {
                            if (numberOf[killer]>0)
-                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible. Defend yourself against the killers.",it->first->getClientID(),partyColours_[piggy]);
+                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible. Defend yourself against the killers.",elem.first->getClientID(),partyColours_[piggy]);
                            else
-                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible.",it->first->getClientID(),partyColours_[piggy]);
+                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible.",elem.first->getClientID(),partyColours_[piggy]);
                            //this->gtinfo_->sendFadingMessage("You're now a chaser.",it->first->getClientID());
                        }
-                       else if (it->second==piggy)
-                       {
-                           this->gtinfo_->sendStaticMessage("Either hide or shoot a chaser.",it->first->getClientID(),partyColours_[chaser]);
+                       else if (elem.second==piggy)
+                       {
+                           this->gtinfo_->sendStaticMessage("Either hide or shoot a chaser.",elem.first->getClientID(),partyColours_[chaser]);
                            //this->gtinfo_->sendFadingMessage("You're now a victim.",it->first->getClientID());
                        }
-                       else if (it->second==killer)
-                       {
-                           this->gtinfo_->sendStaticMessage("Take the chasers down.",it->first->getClientID(),partyColours_[chaser]);
+                       else if (elem.second==killer)
+                       {
+                           this->gtinfo_->sendStaticMessage("Take the chasers down.",elem.first->getClientID(),partyColours_[chaser]);
                            //this->gtinfo_->sendFadingMessage("You're now a killer.",it->first->getClientID());
                        }
@@ -620,9 +620,9 @@
         else if(tutorial) // Announce selectionphase
         {
-            for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
-            {
-                if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+            for (auto & elem : this->playerParty_)
+            {
+                if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                     continue;
-                this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",it->first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
+                this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",elem.first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
             }
         }
@@ -676,8 +676,8 @@
             unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
             unsigned int index = 0;
-            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
+            for (const auto & teamSpawnPoint : teamSpawnPoints)
             {
                 if (index == randomspawn)
-                    return (*it);
+                    return (teamSpawnPoint);
 
                 ++index;
Index: /code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc	(revision 10821)
@@ -139,9 +139,9 @@
         if (!this->gtinfo_->hasStarted())
         {
-            for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+            for (auto & elem : this->players_)
             {
                 // Inform the GametypeInfo that the player is ready to spawn.
-                if(it->first->isHumanPlayer() && it->first->isReadyToSpawn())
-                    this->gtinfo_->playerReadyToSpawn(it->first);
+                if(elem.first->isHumanPlayer() && elem.first->isReadyToSpawn())
+                    this->gtinfo_->playerReadyToSpawn(elem.first);
             }
 
@@ -169,9 +169,9 @@
         }
 
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if (it->first->getControllableEntity())
-            {
-                ControllableEntity* oldentity = it->first->getControllableEntity();
+        for (auto & elem : this->players_)
+        {
+            if (elem.first->getControllableEntity())
+            {
+                ControllableEntity* oldentity = elem.first->getControllableEntity();
 
                 ControllableEntity* entity = this->defaultControllableEntity_.fabricate(oldentity->getContext());
@@ -186,8 +186,8 @@
                     entity->setOrientation(oldentity->getWorldOrientation());
                 }
-                it->first->startControl(entity);
+                elem.first->startControl(entity);
             }
             else
-                this->spawnPlayerAsDefaultPawn(it->first);
+                this->spawnPlayerAsDefaultPawn(elem.first);
         }
     }
@@ -341,11 +341,11 @@
             unsigned int index = 0;
             std::vector<SpawnPoint*> activeSpawnPoints;
-            for (std::set<SpawnPoint*>::const_iterator it = this->spawnpoints_.begin(); it != this->spawnpoints_.end(); ++it)
+            for (const auto & elem : this->spawnpoints_)
             {
                 if (index == randomspawn)
-                    fallbackSpawnPoint = (*it);
-
-                if (*it != nullptr && (*it)->isActive())
-                    activeSpawnPoints.push_back(*it);
+                    fallbackSpawnPoint = (elem);
+
+                if (elem != nullptr && (elem)->isActive())
+                    activeSpawnPoints.push_back(elem);
 
                 ++index;
@@ -366,14 +366,14 @@
     void Gametype::assignDefaultPawnsIfNeeded()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if (!it->first->getControllableEntity())
-            {
-                it->second.state_ = PlayerState::Dead;
-
-                if (!it->first->isReadyToSpawn() || !this->gtinfo_->hasStarted())
-                {
-                    this->spawnPlayerAsDefaultPawn(it->first);
-                    it->second.state_ = PlayerState::Dead;
+        for (auto & elem : this->players_)
+        {
+            if (!elem.first->getControllableEntity())
+            {
+                elem.second.state_ = PlayerState::Dead;
+
+                if (!elem.first->isReadyToSpawn() || !this->gtinfo_->hasStarted())
+                {
+                    this->spawnPlayerAsDefaultPawn(elem.first);
+                    elem.second.state_ = PlayerState::Dead;
                 }
             }
@@ -404,9 +404,9 @@
                     bool allplayersready = true;
                     bool hashumanplayers = false;
-                    for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+                    for (auto & elem : this->players_)
                     {
-                        if (!it->first->isReadyToSpawn())
+                        if (!elem.first->isReadyToSpawn())
                             allplayersready = false;
-                        if (it->first->isHumanPlayer())
+                        if (elem.first->isHumanPlayer())
                             hashumanplayers = true;
                     }
@@ -430,8 +430,8 @@
     void Gametype::spawnPlayersIfRequested()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if (it->first->isReadyToSpawn() || this->bForceSpawn_)
-                this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+        {
+            if (elem.first->isReadyToSpawn() || this->bForceSpawn_)
+                this->spawnPlayer(elem.first);
         }
     }
@@ -439,8 +439,8 @@
     void Gametype::spawnDeadPlayersIfRequested()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if (it->second.state_ == PlayerState::Dead)
-                if (it->first->isReadyToSpawn() || this->bForceSpawn_)
-                    this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+            if (elem.second.state_ == PlayerState::Dead)
+                if (elem.first->isReadyToSpawn() || this->bForceSpawn_)
+                    this->spawnPlayer(elem.first);
     }
 
@@ -538,9 +538,9 @@
     GSLevelMementoState* Gametype::exportMementoState()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if (it->first->isHumanPlayer() && it->first->getControllableEntity() && it->first->getControllableEntity()->getCamera())
-            {
-                Camera* camera = it->first->getControllableEntity()->getCamera();
+        for (auto & elem : this->players_)
+        {
+            if (elem.first->isHumanPlayer() && elem.first->getControllableEntity() && elem.first->getControllableEntity()->getCamera())
+            {
+                Camera* camera = elem.first->getControllableEntity()->getCamera();
 
                 GametypeMementoState* state = new GametypeMementoState();
@@ -559,7 +559,7 @@
         // find correct memento state
         GametypeMementoState* state = nullptr;
-        for (size_t i = 0; i < states.size(); ++i)
-        {
-            state = dynamic_cast<GametypeMementoState*>(states[i]);
+        for (auto & states_i : states)
+        {
+            state = dynamic_cast<GametypeMementoState*>(states_i);
             if (state)
                 break;
@@ -587,12 +587,12 @@
 
         // find correct player and assign default entity with original position & orientation
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if (it->first->isHumanPlayer())
+        for (auto & elem : this->players_)
+        {
+            if (elem.first->isHumanPlayer())
             {
                 ControllableEntity* entity = this->defaultControllableEntity_.fabricate(scene->getContext());
                 entity->setPosition(state->cameraPosition_);
                 entity->setOrientation(state->cameraOrientation_);
-                it->first->startControl(entity);
+                elem.first->startControl(entity);
                 break;
             }
Index: /code/branches/cpp11_v2/src/orxonox/gametypes/LastManStanding.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/gametypes/LastManStanding.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/gametypes/LastManStanding.cc	(revision 10821)
@@ -56,11 +56,11 @@
     void LastManStanding::spawnDeadPlayersIfRequested()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if (it->second.state_ == PlayerState::Dead)
-            {
-                bool alive = (0<playerLives_[it->first]&&(inGame_[it->first]));
-                if (alive&&(it->first->isReadyToSpawn() || this->bForceSpawn_))
-                {
-                    this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+            if (elem.second.state_ == PlayerState::Dead)
+            {
+                bool alive = (0<playerLives_[elem.first]&&(inGame_[elem.first]));
+                if (alive&&(elem.first->isReadyToSpawn() || this->bForceSpawn_))
+                {
+                    this->spawnPlayer(elem.first);
                 }
             }
@@ -114,10 +114,10 @@
     {
         int min=lives;
-        for (std::map<PlayerInfo*, int>::iterator it = this->playerLives_.begin(); it != this->playerLives_.end(); ++it)
-        {
-            if (it->second<=0)
+        for (auto & elem : this->playerLives_)
+        {
+            if (elem.second<=0)
                 continue;
-            if (it->second<lives)
-                min=it->second;
+            if (elem.second<lives)
+                min=elem.second;
         }
         return min;
@@ -128,13 +128,13 @@
         Gametype::end();
 
-        for (std::map<PlayerInfo*, int>::iterator it = this->playerLives_.begin(); it != this->playerLives_.end(); ++it)
-        {
-            if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+        for (auto & elem : this->playerLives_)
+        {
+            if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                 continue;
 
-            if (it->second > 0)
-                this->gtinfo_->sendAnnounceMessage("You have won the match!", it->first->getClientID());
+            if (elem.second > 0)
+                this->gtinfo_->sendAnnounceMessage("You have won the match!", elem.first->getClientID());
             else
-                this->gtinfo_->sendAnnounceMessage("You have lost the match!", it->first->getClientID());
+                this->gtinfo_->sendAnnounceMessage("You have lost the match!", elem.first->getClientID());
         }
     }
@@ -237,39 +237,39 @@
                 this->end();
             }
-            for (std::map<PlayerInfo*, float>::iterator it = this->timeToAct_.begin(); it != this->timeToAct_.end(); ++it)
-            {
-                if (playerGetLives(it->first)<=0)//Players without lives shouldn't be affected by time.
+            for (auto & elem : this->timeToAct_)
+            {
+                if (playerGetLives(elem.first)<=0)//Players without lives shouldn't be affected by time.
                     continue;
-                it->second-=dt;//Decreases punishment time.
-                if (!inGame_[it->first])//Manages respawn delay - player is forced to respawn after the delaytime is used up.
-                {
-                    playerDelayTime_[it->first]-=dt;
-                    if (playerDelayTime_[it->first]<=0)
-                    this->inGame_[it->first]=true;
-
-                    if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
+                elem.second-=dt;//Decreases punishment time.
+                if (!inGame_[elem.first])//Manages respawn delay - player is forced to respawn after the delaytime is used up.
+                {
+                    playerDelayTime_[elem.first]-=dt;
+                    if (playerDelayTime_[elem.first]<=0)
+                    this->inGame_[elem.first]=true;
+
+                    if (elem.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                         continue;
-                    int output=1+(int)playerDelayTime_[it->first];
+                    int output=1+(int)playerDelayTime_[elem.first];
                     const std::string& message = "Respawn in " +multi_cast<std::string>(output)+ " seconds." ;//Countdown
-                    this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
-                }
-                else if (it->second<0.0f)
-                {
-                    it->second=timeRemaining+3.0f;//reset punishment-timer
-                    if (playerGetLives(it->first)>0)
+                    this->gtinfo_->sendFadingMessage(message,elem.first->getClientID());
+                }
+                else if (elem.second<0.0f)
+                {
+                    elem.second=timeRemaining+3.0f;//reset punishment-timer
+                    if (playerGetLives(elem.first)>0)
                     {
-                        this->punishPlayer(it->first);
-                        if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
+                        this->punishPlayer(elem.first);
+                        if (elem.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                             return;
                         const std::string& message = ""; // resets Camper-Warning-message
-                        this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
+                        this->gtinfo_->sendFadingMessage(message,elem.first->getClientID());
                     }
                 }
-                else if (it->second<timeRemaining/5)//Warning message
-                {
-                    if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
+                else if (elem.second<timeRemaining/5)//Warning message
+                {
+                    if (elem.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                         continue;
                     const std::string& message = "Camper Warning! Don't forget to shoot.";
-                    this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
+                    this->gtinfo_->sendFadingMessage(message,elem.first->getClientID());
                 }
             }
Index: /code/branches/cpp11_v2/src/orxonox/gametypes/LastTeamStanding.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/gametypes/LastTeamStanding.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/gametypes/LastTeamStanding.cc	(revision 10821)
@@ -145,11 +145,11 @@
     void LastTeamStanding::spawnDeadPlayersIfRequested()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if (it->second.state_ == PlayerState::Dead)
-            {
-                bool alive = (0 < playerLives_[it->first]&&(inGame_[it->first]));
-                if (alive&&(it->first->isReadyToSpawn() || this->bForceSpawn_))
-                {
-                    this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+            if (elem.second.state_ == PlayerState::Dead)
+            {
+                bool alive = (0 < playerLives_[elem.first]&&(inGame_[elem.first]));
+                if (alive&&(elem.first->isReadyToSpawn() || this->bForceSpawn_))
+                {
+                    this->spawnPlayer(elem.first);
                 }
             }
@@ -184,39 +184,39 @@
                 this->end();
             }
-            for (std::map<PlayerInfo*, float>::iterator it = this->timeToAct_.begin(); it != this->timeToAct_.end(); ++it)
-            {
-                if (playerGetLives(it->first) <= 0)//Players without lives shouldn't be affected by time.
+            for (auto & elem : this->timeToAct_)
+            {
+                if (playerGetLives(elem.first) <= 0)//Players without lives shouldn't be affected by time.
                     continue;
-                it->second -= dt;//Decreases punishment time.
-                if (!inGame_[it->first])//Manages respawn delay - player is forced to respawn after the delaytime is used up.
-                {
-                    playerDelayTime_[it->first] -= dt;
-                    if (playerDelayTime_[it->first] <= 0)
-                    this->inGame_[it->first] = true;
-
-                    if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
+                elem.second -= dt;//Decreases punishment time.
+                if (!inGame_[elem.first])//Manages respawn delay - player is forced to respawn after the delaytime is used up.
+                {
+                    playerDelayTime_[elem.first] -= dt;
+                    if (playerDelayTime_[elem.first] <= 0)
+                    this->inGame_[elem.first] = true;
+
+                    if (elem.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                         continue;
-                    int output = 1 + (int)playerDelayTime_[it->first];
+                    int output = 1 + (int)playerDelayTime_[elem.first];
                     const std::string& message = "Respawn in " +multi_cast<std::string>(output)+ " seconds." ;//Countdown
-                    this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
-                }
-                else if (it->second < 0.0f)
-                {
-                    it->second = timeRemaining + 3.0f;//reset punishment-timer
-                    if (playerGetLives(it->first) > 0)
+                    this->gtinfo_->sendFadingMessage(message,elem.first->getClientID());
+                }
+                else if (elem.second < 0.0f)
+                {
+                    elem.second = timeRemaining + 3.0f;//reset punishment-timer
+                    if (playerGetLives(elem.first) > 0)
                     {
-                        this->punishPlayer(it->first);
-                        if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                        this->punishPlayer(elem.first);
+                        if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                             return;
                         const std::string& message = ""; // resets Camper-Warning-message
-                        this->gtinfo_->sendFadingMessage(message, it->first->getClientID());
+                        this->gtinfo_->sendFadingMessage(message, elem.first->getClientID());
                     }
                 }
-                else if (it->second < timeRemaining/5)//Warning message
-                {
-                  if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
+                else if (elem.second < timeRemaining/5)//Warning message
+                {
+                  if (elem.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                         continue;
                     const std::string& message = "Camper Warning! Don't forget to shoot.";
-                    this->gtinfo_->sendFadingMessage(message, it->first->getClientID());
+                    this->gtinfo_->sendFadingMessage(message, elem.first->getClientID());
                 }
             }
@@ -229,13 +229,13 @@
         int party = -1;
         //find a player who survived
-        for (std::map<PlayerInfo*, int>::iterator it = this->playerLives_.begin(); it != this->playerLives_.end(); ++it)
-        {
-          if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+        for (auto & elem : this->playerLives_)
+        {
+          if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                 continue;
 
-            if (it->second > 0)//a player that is alive
+            if (elem.second > 0)//a player that is alive
             {
                 //which party has survived?
-                std::map<PlayerInfo*, int>::iterator it2 = this->teamnumbers_.find(it->first);
+                std::map<PlayerInfo*, int>::iterator it2 = this->teamnumbers_.find(elem.first);
                 if (it2 != this->teamnumbers_.end())
                 {
@@ -255,10 +255,10 @@
     {
         int min = lives;
-        for (std::map<PlayerInfo*, int>::iterator it = this->playerLives_.begin(); it != this->playerLives_.end(); ++it)
-        {
-            if (it->second <= 0)
+        for (auto & elem : this->playerLives_)
+        {
+            if (elem.second <= 0)
                 continue;
-            if (it->second < lives)
-                min = it->second;
+            if (elem.second < lives)
+                min = elem.second;
         }
         return min;
Index: /code/branches/cpp11_v2/src/orxonox/gametypes/TeamBaseMatch.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/gametypes/TeamBaseMatch.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/gametypes/TeamBaseMatch.cc	(revision 10821)
@@ -152,11 +152,11 @@
         int amountControlled2 = 0;
 
-        for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it)
-        {
-            if((*it)->getState() == BaseState::ControlTeam1)
+        for (const auto & elem : this->bases_)
+        {
+            if((elem)->getState() == BaseState::ControlTeam1)
             {
                 amountControlled++;
             }
-            if((*it)->getState() == BaseState::ControlTeam2)
+            if((elem)->getState() == BaseState::ControlTeam2)
             {
                 amountControlled2++;
@@ -187,13 +187,13 @@
             }
 
-            for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-            {
-                if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+            for (auto & elem : this->teamnumbers_)
+            {
+                if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                     continue;
 
-                if (it->second == winningteam)
-                    this->gtinfo_->sendAnnounceMessage("You have won the match!", it->first->getClientID());
+                if (elem.second == winningteam)
+                    this->gtinfo_->sendAnnounceMessage("You have won the match!", elem.first->getClientID());
                 else
-                    this->gtinfo_->sendAnnounceMessage("You have lost the match!", it->first->getClientID());
+                    this->gtinfo_->sendAnnounceMessage("You have lost the match!", elem.first->getClientID());
             }
 
@@ -238,9 +238,9 @@
         int count = 0;
 
-        for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it)
-        {
-            if ((*it)->getState() == BaseState::ControlTeam1 && team == 0)
+        for (const auto & elem : this->bases_)
+        {
+            if ((elem)->getState() == BaseState::ControlTeam1 && team == 0)
                 count++;
-            if ((*it)->getState() == BaseState::ControlTeam2 && team == 1)
+            if ((elem)->getState() == BaseState::ControlTeam2 && team == 1)
                 count++;
         }
@@ -258,9 +258,9 @@
     {
         unsigned int i = 0;
-        for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it)
+        for (const auto & elem : this->bases_)
         {
             i++;
             if (i > index)
-                return (*it);
+                return (elem);
         }
         return nullptr;
Index: /code/branches/cpp11_v2/src/orxonox/gametypes/TeamDeathmatch.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/gametypes/TeamDeathmatch.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/gametypes/TeamDeathmatch.cc	(revision 10821)
@@ -69,10 +69,10 @@
         int winnerTeam = 0;
         int highestScore = 0;
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+        for (auto & elem : this->players_)
         {
-            if ( this->getTeamScore(it->first) > highestScore )
+            if ( this->getTeamScore(elem.first) > highestScore )
             {
-                winnerTeam = this->getTeam(it->first);
-                highestScore = this->getTeamScore(it->first);
+                winnerTeam = this->getTeam(elem.first);
+                highestScore = this->getTeamScore(elem.first);
             }
         }
Index: /code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc	(revision 10821)
@@ -99,7 +99,7 @@
         std::vector<unsigned int> playersperteam(this->teams_, 0);
 
-        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-            if (it->second < static_cast<int>(this->teams_) && it->second >= 0)
-                playersperteam[it->second]++;
+        for (auto & elem : this->teamnumbers_)
+            if (elem.second < static_cast<int>(this->teams_) && elem.second >= 0)
+                playersperteam[elem.second]++;
 
         unsigned int minplayers = static_cast<unsigned int>(-1);
@@ -123,8 +123,8 @@
         if( (this->players_.size() >= maxPlayers_) && (allowedInGame_[player] == true) ) // if there's a "waiting list"
         {
-            for (std::map<PlayerInfo*, bool>::iterator it = this->allowedInGame_.begin(); it != this->allowedInGame_.end(); ++it)
-            {
-                 if(it->second == false) // waiting player found
-                 {it->second = true; break;} // allow player to enter
+            for (auto & elem : this->allowedInGame_)
+            {
+                 if(elem.second == false) // waiting player found
+                 {elem.second = true; break;} // allow player to enter
             }
         }
@@ -141,15 +141,15 @@
     void TeamGametype::spawnDeadPlayersIfRequested()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)\
-        {
-            if(allowedInGame_[it->first] == false)//check if dead player is allowed to enter
+        for (auto & elem : this->players_)\
+        {
+            if(allowedInGame_[elem.first] == false)//check if dead player is allowed to enter
             {
                 continue;
             }
-            if (it->second.state_ == PlayerState::Dead)
-            {
-                if ((it->first->isReadyToSpawn() || this->bForceSpawn_))
+            if (elem.second.state_ == PlayerState::Dead)
+            {
+                if ((elem.first->isReadyToSpawn() || this->bForceSpawn_))
                 {
-                   this->spawnPlayer(it->first);
+                   this->spawnPlayer(elem.first);
                 }
             }
@@ -178,9 +178,9 @@
         if(!player || this->getTeam(player) == -1)
             return 0;
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if ( this->getTeam(it->first) ==  this->getTeam(player) )
-            {
-                teamscore += it->second.frags_;
+        for (auto & elem : this->players_)
+        {
+            if ( this->getTeam(elem.first) ==  this->getTeam(player) )
+            {
+                teamscore += elem.second.frags_;
             }
         }
@@ -191,7 +191,7 @@
     {
         int teamSize = 0;
-        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-        {
-            if (it->second == team)
+        for (auto & elem : this->teamnumbers_)
+        {
+            if (elem.second == team)
                 teamSize++;
         }
@@ -202,7 +202,7 @@
     {
         int teamSize = 0;
-        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-        {
-            if (it->second == team  && it->first->isHumanPlayer())
+        for (auto & elem : this->teamnumbers_)
+        {
+            if (elem.second == team  && elem.first->isHumanPlayer())
                 teamSize++;
         }
@@ -241,9 +241,9 @@
             unsigned int index = 0;
             // Get random fallback spawnpoint in case there is no active SpawnPoint.
-            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
+            for (const auto & teamSpawnPoint : teamSpawnPoints)
             {
                 if (index == randomspawn)
                 {
-                    fallbackSpawnPoint = (*it);
+                    fallbackSpawnPoint = (teamSpawnPoint);
                     break;
                 }
@@ -266,8 +266,8 @@
             randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
             index = 0;
-            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
+            for (const auto & teamSpawnPoint : teamSpawnPoints)
             {
                 if (index == randomspawn)
-                    return (*it);
+                    return (teamSpawnPoint);
 
                 ++index;
@@ -364,9 +364,9 @@
 
         std::set<WorldEntity*> pawnAttachments = pawn->getAttachedObjects();
-        for (std::set<WorldEntity*>::iterator it = pawnAttachments.begin(); it != pawnAttachments.end(); ++it)
-        {
-            if ((*it)->isA(Class(TeamColourable)))
-            {
-                TeamColourable* tc = orxonox_cast<TeamColourable*>(*it);
+        for (const auto & pawnAttachment : pawnAttachments)
+        {
+            if ((pawnAttachment)->isA(Class(TeamColourable)))
+            {
+                TeamColourable* tc = orxonox_cast<TeamColourable*>(pawnAttachment);
                 tc->setTeamColour(this->teamcolours_[teamNr]);
             }
@@ -376,15 +376,15 @@
     void TeamGametype::announceTeamWin(int winnerTeam)
     {
-        for (std::map<PlayerInfo*, int>::iterator it3 = this->teamnumbers_.begin(); it3 != this->teamnumbers_.end(); ++it3)
-        {
-            if (it3->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+        for (auto & elem : this->teamnumbers_)
+        {
+            if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                 continue;
-            if (it3->second == winnerTeam)
-            {
-                this->gtinfo_->sendAnnounceMessage("Your team has won the match!", it3->first->getClientID());
+            if (elem.second == winnerTeam)
+            {
+                this->gtinfo_->sendAnnounceMessage("Your team has won the match!", elem.first->getClientID());
             }
             else
             {
-                this->gtinfo_->sendAnnounceMessage("Your team has lost the match!", it3->first->getClientID());
+                this->gtinfo_->sendAnnounceMessage("Your team has lost the match!", elem.first->getClientID());
             }
         }   
Index: /code/branches/cpp11_v2/src/orxonox/gametypes/UnderAttack.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/gametypes/UnderAttack.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/gametypes/UnderAttack.cc	(revision 10821)
@@ -74,13 +74,13 @@
         this->gameEnded_ = true;
 
-        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-        {
-            if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+        for (auto & elem : this->teamnumbers_)
+        {
+            if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                 continue;
 
-            if (it->second == attacker_)
-                this->gtinfo_->sendAnnounceMessage("You have won the match!", it->first->getClientID());
+            if (elem.second == attacker_)
+                this->gtinfo_->sendAnnounceMessage("You have won the match!", elem.first->getClientID());
             else
-                this->gtinfo_->sendAnnounceMessage("You have lost the match!", it->first->getClientID());
+                this->gtinfo_->sendAnnounceMessage("You have lost the match!", elem.first->getClientID());
         }
     }
@@ -155,13 +155,13 @@
                 ChatManager::message(message);
 
-                for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-                {
-                    if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                for (auto & elem : this->teamnumbers_)
+                {
+                    if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                         continue;
 
-                    if (it->second == 1)
-                        this->gtinfo_->sendAnnounceMessage("You have won the match!", it->first->getClientID());
+                    if (elem.second == 1)
+                        this->gtinfo_->sendAnnounceMessage("You have won the match!", elem.first->getClientID());
                     else
-                        this->gtinfo_->sendAnnounceMessage("You have lost the match!", it->first->getClientID());
+                        this->gtinfo_->sendAnnounceMessage("You have lost the match!", elem.first->getClientID());
                 }
             }
Index: /code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.cc	(revision 10821)
@@ -135,9 +135,9 @@
         // Go recursively through all children to check whether they are the target.
         std::vector<PickupCarrier*>* children = this->getCarrierChildren();
-        for(std::vector<PickupCarrier*>::iterator it = children->begin(); it != children->end(); it++)
+        for(auto & elem : *children)
         {
-            if(pickup->isTarget(*it))
+            if(pickup->isTarget(elem))
             {
-                target = *it;
+                target = elem;
                 break;
             }
Index: /code/branches/cpp11_v2/src/orxonox/interfaces/Pickupable.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/interfaces/Pickupable.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/interfaces/Pickupable.cc	(revision 10821)
@@ -160,7 +160,7 @@
     {
         // Iterate through all targets of this Pickupable.
-        for(std::list<Identifier*>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++)
+        for(const auto & elem : this->targets_)
         {
-            if(identifier->isA(*it))
+            if(identifier->isA(elem))
                 return true;
         }
Index: /code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc	(revision 10821)
@@ -219,8 +219,9 @@
     {
         unsigned int i = 0;
-        for (std::vector<EffectContainer*>::const_iterator it = this->effectContainers_.begin(); it != this->effectContainers_.end(); ++it)
+        for (const auto & elem : this->effectContainers_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
+            i++;
         }
         return nullptr;
Index: /code/branches/cpp11_v2/src/orxonox/items/ShipPart.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/items/ShipPart.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/items/ShipPart.cc	(revision 10821)
@@ -148,7 +148,7 @@
     bool ShipPart::hasEntity(StaticEntity* entity) const
     {
-        for(unsigned int i = 0; i < this->entityList_.size(); i++)
-        {
-            if(this->entityList_[i] == entity)
+        for(auto & elem : this->entityList_)
+        {
+            if(elem == entity)
                 return true;
         }
Index: /code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc	(revision 10821)
@@ -62,6 +62,6 @@
     OverlayGroup::~OverlayGroup()
     {
-        for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
-            (*it)->destroy();
+        for (const auto & elem : hudElements_)
+            (elem)->destroy();
         this->hudElements_.clear();
     }
@@ -86,6 +86,6 @@
     void OverlayGroup::setScale(const Vector2& scale)
     {
-        for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
-            (*it)->scale(scale / this->scale_);
+        for (const auto & elem : hudElements_)
+            (elem)->scale(scale / this->scale_);
         this->scale_ = scale;
     }
@@ -94,6 +94,6 @@
     void OverlayGroup::setScroll(const Vector2& scroll)
     {
-        for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
-            (*it)->scroll(scroll - this->scroll_);
+        for (const auto & elem : hudElements_)
+            (elem)->scroll(scroll - this->scroll_);
         this->scroll_ = scroll;
     }
@@ -147,6 +147,6 @@
         SUPER( OverlayGroup, changedVisibility );
 
-        for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
-            (*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed
+        for (const auto & elem : hudElements_)
+            (elem)->changedVisibility(); //inform all Child Overlays that our visibility has changed
     }
 
@@ -155,6 +155,6 @@
         this->owner_ = owner;
 
-        for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
-            (*it)->setOwner(owner);
+        for (const auto & elem : hudElements_)
+            (elem)->setOwner(owner);
     }
 
Index: /code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc	(revision 10821)
@@ -407,10 +407,10 @@
         if (ambient != nullptr)
         {
-            for (AmbientList::iterator it = this->ambientSounds_.begin(); it != this->ambientSounds_.end(); ++it)
-            {
-                if (it->first == ambient)
+            for (auto & elem : this->ambientSounds_)
+            {
+                if (elem.first == ambient)
                 {
-                    it->second = true;
-                    this->fadeOut(it->first);
+                    elem.second = true;
+                    this->fadeOut(elem.first);
                     return;
                 }
Index: /code/branches/cpp11_v2/src/orxonox/sound/SoundStreamer.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/sound/SoundStreamer.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/sound/SoundStreamer.cc	(revision 10821)
@@ -68,5 +68,5 @@
         int current_section;
 
-        for(int i = 0; i < 4; i++)
+        for(auto & initbuffer : initbuffers)
         {
             long ret = ov_read(&vf, inbuffer, sizeof(inbuffer), 0, 2, 1, &current_section);
@@ -82,5 +82,5 @@
             }
 
-            alBufferData(initbuffers[i], format, &inbuffer, ret, vorbisInfo->rate);
+            alBufferData(initbuffer, format, &inbuffer, ret, vorbisInfo->rate);
         }
         alSourceQueueBuffers(audioSource, 4, initbuffers);
Index: /code/branches/cpp11_v2/src/orxonox/weaponsystem/Munition.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/weaponsystem/Munition.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/weaponsystem/Munition.cc	(revision 10821)
@@ -55,6 +55,6 @@
     Munition::~Munition()
     {
-        for (std::map<WeaponMode*, Magazine*>::iterator it = this->currentMagazines_.begin(); it != this->currentMagazines_.end(); ++it)
-            delete it->second;
+        for (auto & elem : this->currentMagazines_)
+            delete elem.second;
     }
 
@@ -268,6 +268,6 @@
         {
             // Return true if any of the current magazines is not full (loading counts as full although it returns 0 munition)
-            for (std::map<WeaponMode*, Magazine*>::const_iterator it = this->currentMagazines_.begin(); it != this->currentMagazines_.end(); ++it)
-                if (it->second->munition_ < this->maxMunitionPerMagazine_ && it->second->bLoaded_)
+            for (const auto & elem : this->currentMagazines_)
+                if (elem.second->munition_ < this->maxMunitionPerMagazine_ && elem.second->bLoaded_)
                     return true;
         }
@@ -316,10 +316,10 @@
             {
                 bool change = false;
-                for (std::map<WeaponMode*, Magazine*>::iterator it = this->currentMagazines_.begin(); it != this->currentMagazines_.end(); ++it)
+                for (auto & elem : this->currentMagazines_)
                 {
                     // Add munition if the magazine isn't full (but only to loaded magazines)
-                    if (amount > 0 && it->second->munition_ < this->maxMunitionPerMagazine_ && it->second->bLoaded_)
+                    if (amount > 0 && elem.second->munition_ < this->maxMunitionPerMagazine_ && elem.second->bLoaded_)
                     {
-                        it->second->munition_++;
+                        elem.second->munition_++;
                         amount--;
                         change = true;
Index: /code/branches/cpp11_v2/src/orxonox/weaponsystem/Weapon.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/weaponsystem/Weapon.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/weaponsystem/Weapon.cc	(revision 10821)
@@ -61,6 +61,6 @@
                 this->weaponPack_->removeWeapon(this);
 
-            for (std::multimap<unsigned int, WeaponMode*>::iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
-                it->second->destroy();
+            for (auto & elem : this->weaponmodes_)
+                elem.second->destroy();
         }
     }
@@ -85,8 +85,8 @@
     {
         unsigned int i = 0;
-        for (std::multimap<unsigned int, WeaponMode*>::const_iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
+        for (const auto & elem : this->weaponmodes_)
         {
             if (i == index)
-                return it->second;
+                return elem.second;
 
             ++i;
@@ -136,6 +136,6 @@
     void Weapon::reload()
     {
-        for (std::multimap<unsigned int, WeaponMode*>::iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
-            it->second->reload();
+        for (auto & elem : this->weaponmodes_)
+            elem.second->reload();
     }
 
@@ -148,6 +148,6 @@
     void Weapon::notifyWeaponModes()
     {
-        for (std::multimap<unsigned int, WeaponMode*>::iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
-            it->second->setWeapon(this);
+        for (auto & elem : this->weaponmodes_)
+            elem.second->setWeapon(this);
     }
 }
Index: /code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponPack.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponPack.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponPack.cc	(revision 10821)
@@ -76,6 +76,6 @@
     void WeaponPack::fire(unsigned int weaponmode)
     {
-        for (std::vector<Weapon *>::iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it)
-            (*it)->fire(weaponmode);
+        for (auto & elem : this->weapons_)
+            (elem)->fire(weaponmode);
     }
 
@@ -86,6 +86,6 @@
     void WeaponPack::reload()
     {
-        for (std::vector<Weapon *>::iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it)
-            (*it)->reload();
+        for (auto & elem : this->weapons_)
+            (elem)->reload();
     }
 
@@ -114,8 +114,8 @@
         unsigned int i = 0;
 
-        for (std::vector<Weapon *>::const_iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it)
+        for (const auto & elem : this->weapons_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
@@ -132,8 +132,8 @@
     {
         unsigned int i = 0;
-        for (std::set<DefaultWeaponmodeLink*>::const_iterator it = this->links_.begin(); it != this->links_.end(); ++it)
+        for (const auto & elem : this->links_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
 
             ++i;
@@ -144,7 +144,7 @@
     unsigned int WeaponPack::getDesiredWeaponmode(unsigned int firemode) const
     {
-        for (std::set<DefaultWeaponmodeLink*>::const_iterator it = this->links_.begin(); it != this->links_.end(); ++it)
-            if ((*it)->getFiremode() == firemode)
-                return (*it)->getWeaponmode();
+        for (const auto & elem : this->links_)
+            if ((elem)->getFiremode() == firemode)
+                return (elem)->getWeaponmode();
 
         return WeaponSystem::WEAPON_MODE_UNASSIGNED;
Index: /code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSet.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSet.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSet.cc	(revision 10821)
@@ -63,7 +63,7 @@
     {
         // Fire all WeaponPacks with their defined weaponmode
-        for (std::map<WeaponPack*, unsigned int>::iterator it = this->weaponpacks_.begin(); it != this->weaponpacks_.end(); ++it)
-            if (it->second != WeaponSystem::WEAPON_MODE_UNASSIGNED)
-                it->first->fire(it->second);
+        for (auto & elem : this->weaponpacks_)
+            if (elem.second != WeaponSystem::WEAPON_MODE_UNASSIGNED)
+                elem.first->fire(elem.second);
     }
 
@@ -71,6 +71,6 @@
     {
         // Reload all WeaponPacks with their defined weaponmode
-        for (std::map<WeaponPack*, unsigned int>::iterator it = this->weaponpacks_.begin(); it != this->weaponpacks_.end(); ++it)
-            it->first->reload();
+        for (auto & elem : this->weaponpacks_)
+            elem.first->reload();
     }
 
Index: /code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSystem.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSystem.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSystem.cc	(revision 10821)
@@ -106,9 +106,9 @@
     {
         unsigned int i = 0;
-        for (std::vector<WeaponSlot*>::const_iterator it = this->weaponSlots_.begin(); it != this->weaponSlots_.end(); ++it)
+        for (const auto & elem : this->weaponSlots_)
         {
             ++i;
             if (i > index)
-                return (*it);
+                return (elem);
         }
         return nullptr;
@@ -153,9 +153,9 @@
     {
         unsigned int i = 0;
-        for (std::map<unsigned int, WeaponSet*>::const_iterator it = this->weaponSets_.begin(); it != this->weaponSets_.end(); ++it)
+        for (const auto & elem : this->weaponSets_)
         {
             ++i;
             if (i > index)
-                return it->second;
+                return elem.second;
         }
         return nullptr;
@@ -168,7 +168,7 @@
 
         unsigned int freeSlots = 0;
-        for (std::vector<WeaponSlot*>::iterator it = this->weaponSlots_.begin(); it != this->weaponSlots_.end(); ++it)
-        {
-            if (!(*it)->isOccupied())
+        for (auto & elem : this->weaponSlots_)
+        {
+            if (!(elem)->isOccupied())
                 ++freeSlots;
         }
@@ -184,10 +184,10 @@
         // Attach all weapons to the first free slots (and to the Pawn)
         unsigned int i = 0;
-        for (std::vector<WeaponSlot*>::iterator it = this->weaponSlots_.begin(); it != this->weaponSlots_.end(); ++it)
-        {
-            if (!(*it)->isOccupied() && i < wPack->getNumWeapons())
+        for (auto & elem : this->weaponSlots_)
+        {
+            if (!(elem)->isOccupied() && i < wPack->getNumWeapons())
             {
                 Weapon* weapon = wPack->getWeapon(i);
-                (*it)->attachWeapon(weapon);
+                (elem)->attachWeapon(weapon);
                 this->getPawn()->attach(weapon);
                 ++i;
@@ -196,9 +196,9 @@
 
         // Assign the desired weaponmode to the firemodes
-        for (std::map<unsigned int, WeaponSet *>::iterator it = this->weaponSets_.begin(); it != this->weaponSets_.end(); ++it)
-        {
-            unsigned int weaponmode = wPack->getDesiredWeaponmode(it->first);
+        for (auto & elem : this->weaponSets_)
+        {
+            unsigned int weaponmode = wPack->getDesiredWeaponmode(elem.first);
             if (weaponmode != WeaponSystem::WEAPON_MODE_UNASSIGNED)
-                it->second->setWeaponmodeLink(wPack, weaponmode);
+                elem.second->setWeaponmodeLink(wPack, weaponmode);
         }
 
@@ -219,6 +219,6 @@
 
         // Remove all added links from the WeaponSets
-        for (std::map<unsigned int, WeaponSet *>::iterator it = this->weaponSets_.begin(); it != this->weaponSets_.end(); ++it)
-            it->second->removeWeaponmodeLink(wPack);
+        for (auto & elem : this->weaponSets_)
+            elem.second->removeWeaponmodeLink(wPack);
 
         // Remove the WeaponPack from the WeaponSystem
@@ -231,9 +231,9 @@
     {
         unsigned int i = 0;
-        for (std::vector<WeaponPack*>::const_iterator it = this->weaponPacks_.begin(); it != this->weaponPacks_.end(); ++it)
+        for (const auto & elem : this->weaponPacks_)
         {
             ++i;
             if (i > index)
-                return (*it);
+                return (elem);
         }
         return nullptr;
@@ -268,7 +268,7 @@
         // Check if the WeaponSet belongs to this WeaponSystem
         bool foundWeaponSet = false;
-        for (std::map<unsigned int, WeaponSet *>::iterator it2 = this->weaponSets_.begin(); it2 != this->weaponSets_.end(); ++it2)
-        {
-            if (it2->second == wSet)
+        for (auto & elem : this->weaponSets_)
+        {
+            if (elem.second == wSet)
             {
                 foundWeaponSet = true;
@@ -296,6 +296,6 @@
     void WeaponSystem::reload()
     {
-        for (std::map<unsigned int, WeaponSet *>::iterator it = this->weaponSets_.begin(); it != this->weaponSets_.end(); ++it)
-            it->second->reload();
+        for (auto & elem : this->weaponSets_)
+            elem.second->reload();
     }
 
Index: /code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc	(revision 10821)
@@ -165,8 +165,8 @@
     {
         unsigned int i = 0;
-        for (std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
+        for (const auto & elem : this->cameraPositions_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
@@ -180,7 +180,7 @@
 
         unsigned int counter = 0;
-        for (std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
-        {
-            if ((*it) == this->currentCameraPosition_)
+        for (const auto & elem : this->cameraPositions_)
+        {
+            if ((elem) == this->currentCameraPosition_)
                 break;
             counter++;
@@ -477,7 +477,7 @@
         if (parent)
         {
-            for (std::list<StrongPtr<CameraPosition>>::iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
-                if ((*it)->getIsAbsolute())
-                    parent->attach((*it));
+            for (auto & elem : this->cameraPositions_)
+                if ((elem)->getIsAbsolute())
+                    parent->attach((elem));
         }
     }
Index: /code/branches/cpp11_v2/src/orxonox/worldentities/EffectContainer.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/worldentities/EffectContainer.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/worldentities/EffectContainer.cc	(revision 10821)
@@ -89,7 +89,7 @@
     {
         unsigned int i = 0;
-        for (std::vector<WorldEntity*>::const_iterator it = this->effects_.begin(); it != this->effects_.end(); ++it)
+        for (const auto & elem : this->effects_)
             if (i == index)
-                return (*it);
+                return (elem);
         return nullptr;
     }
Index: /code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc	(revision 10821)
@@ -233,14 +233,14 @@
 
             // iterate over all children and change their activity as well
-            for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++)
+            for (const auto & elem : this->getAttachedObjects())
             {
                 if(!this->isActive())
                 {
-                    (*it)->bActiveMem_ = (*it)->isActive();
-                    (*it)->setActive(this->isActive());
+                    (elem)->bActiveMem_ = (elem)->isActive();
+                    (elem)->setActive(this->isActive());
                 }
                 else
                 {
-                    (*it)->setActive((*it)->bActiveMem_);
+                    (elem)->setActive((elem)->bActiveMem_);
                 }
             }
@@ -259,14 +259,14 @@
         {
             // iterate over all children and change their visibility as well
-            for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++)
+            for (const auto & elem : this->getAttachedObjects())
             {
                 if(!this->isVisible())
                 {
-                    (*it)->bVisibleMem_ = (*it)->isVisible();
-                    (*it)->setVisible(this->isVisible());
+                    (elem)->bVisibleMem_ = (elem)->isVisible();
+                    (elem)->setVisible(this->isVisible());
                 }
                 else
                 {
-                    (*it)->setVisible((*it)->bVisibleMem_);
+                    (elem)->setVisible((elem)->bVisibleMem_);
                 }
             }
@@ -518,8 +518,8 @@
     {
         unsigned int i = 0;
-        for (std::set<WorldEntity*>::const_iterator it = this->children_.begin(); it != this->children_.end(); ++it)
+        for (const auto & elem : this->children_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
@@ -938,6 +938,6 @@
         // Recalculate mass
         this->childrenMass_ = 0.0f;
-        for (std::set<WorldEntity*>::const_iterator it = this->children_.begin(); it != this->children_.end(); ++it)
-            this->childrenMass_ += (*it)->getMass();
+        for (const auto & elem : this->children_)
+            this->childrenMass_ += (elem)->getMass();
         recalculateMassProps();
         // Notify parent WE
Index: /code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	(revision 10821)
@@ -99,13 +99,13 @@
             }
             // iterate through all attached parts
-            for(unsigned int j = 0; j < this->partList_.size(); j++)
+            for(auto & elem : this->partList_)
             {
                 // if the name of the part matches the name of the object, add the object to that parts entitylist (unless it was already done).
-                if((this->partList_[j]->getName() == this->getAttachedObject(i)->getName()) && !this->partList_[j]->hasEntity(orxonox_cast<StaticEntity*>(this->getAttachedObject(i))))
+                if((elem->getName() == this->getAttachedObject(i)->getName()) && !elem->hasEntity(orxonox_cast<StaticEntity*>(this->getAttachedObject(i))))
                 {
                     // The Entity is added to the part's entityList_
-                    this->partList_[j]->addEntity(orxonox_cast<StaticEntity*>(this->getAttachedObject(i)));
+                    elem->addEntity(orxonox_cast<StaticEntity*>(this->getAttachedObject(i)));
                     // An entry in the partMap_ is created, assigning the part to the entity.
-                    this->addPartEntityAssignment((StaticEntity*)(this->getAttachedObject(i)), this->partList_[j]);
+                    this->addPartEntityAssignment((StaticEntity*)(this->getAttachedObject(i)), elem);
                 }
             }
@@ -146,8 +146,8 @@
     ShipPart* ModularSpaceShip::getPartOfEntity(StaticEntity* entity) const
     {
-        for (std::map<StaticEntity*, ShipPart*>::const_iterator it = this->partMap_.begin(); it != this->partMap_.end(); ++it)
-        {
-            if (it->first == entity)
-                return it->second;
+        for (const auto & elem : this->partMap_)
+        {
+            if (elem.first == entity)
+                return elem.second;
         }
         return nullptr;
@@ -242,9 +242,9 @@
     ShipPart* ModularSpaceShip::getShipPartByName(std::string name)
     {
-        for(std::vector<ShipPart*>::iterator it = this->partList_.begin(); it != this->partList_.end(); ++it)
-        {
-            if(orxonox_cast<ShipPart*>(*it)->getName() == name)
-            {
-                return orxonox_cast<ShipPart*>(*it);
+        for(auto & elem : this->partList_)
+        {
+            if(orxonox_cast<ShipPart*>(elem)->getName() == name)
+            {
+                return orxonox_cast<ShipPart*>(elem);
             }
         }
@@ -261,7 +261,7 @@
     bool ModularSpaceShip::hasShipPart(ShipPart* part) const
     {
-        for(unsigned int i = 0; i < this->partList_.size(); i++)
-        {
-            if(this->partList_[i] == part)
+        for(auto & elem : this->partList_)
+        {
+            if(elem == part)
                 return true;
         }
Index: /code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 10821)
@@ -158,6 +158,6 @@
 
         // Run the engines
-        for(std::vector<Engine*>::iterator it = this->engineList_.begin(); it != this->engineList_.end(); it++)
-            (*it)->run(dt);
+        for(auto & elem : this->engineList_)
+            (elem)->run(dt);
 
         if (this->hasLocalController())
@@ -318,7 +318,7 @@
     bool SpaceShip::hasEngine(Engine* engine) const
     {
-        for(unsigned int i = 0; i < this->engineList_.size(); i++)
-        {
-            if(this->engineList_[i] == engine)
+        for(auto & elem : this->engineList_)
+        {
+            if(elem == engine)
                 return true;
         }
@@ -350,7 +350,7 @@
     Engine* SpaceShip::getEngineByName(const std::string& name)
     {
-        for(size_t i = 0; i < this->engineList_.size(); ++i)
-            if(this->engineList_[i]->getName() == name)
-                return this->engineList_[i];
+        for(auto & elem : this->engineList_)
+            if(elem->getName() == name)
+                return elem;
 
         orxout(internal_warning) << "Couldn't find Engine with name \"" << name << "\"." << endl;
@@ -396,6 +396,6 @@
     void SpaceShip::addSpeedFactor(float factor)
     {
-        for(unsigned int i=0; i<this->engineList_.size(); i++)
-            this->engineList_[i]->addSpeedMultiply(factor);
+        for(auto & elem : this->engineList_)
+            elem->addSpeedMultiply(factor);
     }
 
@@ -408,6 +408,6 @@
     void SpaceShip::addSpeed(float speed)
     {
-        for(unsigned int i=0; i<this->engineList_.size(); i++)
-            this->engineList_[i]->addSpeedAdd(speed);
+        for(auto & elem : this->engineList_)
+            elem->addSpeedAdd(speed);
     }
 
@@ -436,8 +436,8 @@
     {
         float speed=0;
-        for(unsigned int i=0; i<this->engineList_.size(); i++)
-        {
-            if(this->engineList_[i]->getMaxSpeedFront() > speed)
-                speed = this->engineList_[i]->getMaxSpeedFront();
+        for(auto & elem : this->engineList_)
+        {
+            if(elem->getMaxSpeedFront() > speed)
+                speed = elem->getMaxSpeedFront();
         }
         return speed;
Index: /code/branches/cpp11_v2/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc	(revision 10820)
+++ /code/branches/cpp11_v2/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc	(revision 10821)
@@ -80,9 +80,9 @@
 
         std::set<WorldEntity*> attachments = this->getAttachedObjects();
-        for (std::set<WorldEntity*>::iterator it = attachments.begin(); it != attachments.end(); ++it)
+        for (const auto & attachment : attachments)
         {
-            if ((*it)->isA(Class(TeamColourable)))
+            if ((attachment)->isA(Class(TeamColourable)))
             {
-                TeamColourable* tc = orxonox_cast<TeamColourable*>(*it);
+                TeamColourable* tc = orxonox_cast<TeamColourable*>(attachment);
                 tc->setTeamColour(colour);
             }
