Index: code/branches/cpp11_v2/src/libraries/network/Client.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/Client.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/Client.cc	(revision 10919)
@@ -161,8 +161,7 @@
         {
           std::vector<packet::Gamestate*> gamestates = GamestateManager::getGamestates();
-          std::vector<packet::Gamestate*>::iterator it;
-          for( it = gamestates.begin(); it != gamestates.end(); ++it )
+          for( packet::Gamestate* gamestate : gamestates )
           {
-            (*it)->send( static_cast<Host*>(this) );
+            gamestate->send( static_cast<Host*>(this) );
           }
         }
Index: code/branches/cpp11_v2/src/libraries/network/ClientConnectionListener.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/ClientConnectionListener.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/ClientConnectionListener.cc	(revision 10919)
@@ -44,12 +44,12 @@
     void ClientConnectionListener::broadcastClientConnected(unsigned int clientID)
     {
-        for (ObjectList<ClientConnectionListener>::iterator it = ObjectList<ClientConnectionListener>::begin(); it != ObjectList<ClientConnectionListener>::end(); ++it)
-            it->clientConnected(clientID);
+        for (ClientConnectionListener* listener : ObjectList<ClientConnectionListener>())
+            listener->clientConnected(clientID);
     }
 
     void ClientConnectionListener::broadcastClientDisconnected(unsigned int clientID)
     {
-        for (ObjectList<ClientConnectionListener>::iterator it = ObjectList<ClientConnectionListener>::begin(); it != ObjectList<ClientConnectionListener>::end(); ++it)
-            it->clientDisconnected(clientID);
+        for (ClientConnectionListener* listener : ObjectList<ClientConnectionListener>())
+            listener->clientDisconnected(clientID);
     }
 
Index: code/branches/cpp11_v2/src/libraries/network/Connection.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/Connection.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/Connection.cc	(revision 10919)
@@ -237,8 +237,7 @@
   void Connection::disconnectPeersInternal()
   {
-    std::map<uint32_t, ENetPeer*>::iterator it;
-    for( it=this->peerMap_.begin(); it!=this->peerMap_.end(); ++it )
-    {
-      enet_peer_disconnect(it->second, 0);
+    for( const auto& mapEntry : this->peerMap_ )
+    {
+      enet_peer_disconnect(mapEntry.second, 0);
     }
     uint32_t iterations = NETWORK_DISCONNECT_TIMEOUT/NETWORK_WAIT_TIMEOUT;
Index: code/branches/cpp11_v2/src/libraries/network/FunctionCallManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/FunctionCallManager.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/FunctionCallManager.cc	(revision 10919)
@@ -54,9 +54,8 @@
 void FunctionCallManager::sendCalls(orxonox::Host* host)
 {
-  std::map<uint32_t, packet::FunctionCalls*>::iterator it;
-  for (it = FunctionCallManager::sPeerMap_.begin(); it != FunctionCallManager::sPeerMap_.end(); ++it )
+  for (const auto& mapEntry : FunctionCallManager::sPeerMap_ )
   {
     assert(!FunctionCallManager::sPeerMap_.empty());
-    it->second->send(host);
+    mapEntry.second->send(host);
   }
   FunctionCallManager::sPeerMap_.clear();
Index: code/branches/cpp11_v2/src/libraries/network/GamestateManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/GamestateManager.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/GamestateManager.cc	(revision 10919)
@@ -70,13 +70,11 @@
   {
     if( this->currentGamestate_ )
-        delete this->currentGamestate_;std::map<unsigned int, packet::Gamestate*>::iterator it;
-    for( it = gamestateQueue.begin(); it != gamestateQueue.end(); ++it )
-      delete it->second;
-    std::map<uint32_t, peerInfo>::iterator peerIt;
-    std::map<uint32_t, packet::Gamestate*>::iterator gamestateIt;
-    for( peerIt = peerMap_.begin(); peerIt != peerMap_.end(); ++peerIt )
-    {
-      for( gamestateIt = peerIt->second.gamestates.begin(); gamestateIt != peerIt->second.gamestates.end(); ++gamestateIt )
-        delete gamestateIt->second;
+        delete this->currentGamestate_;
+    for( const auto& mapEntry : gamestateQueue )
+      delete mapEntry.second;
+    for( const auto& mapEntryPeer : peerMap_ )
+    {
+      for( const auto& mapEntryGamestate : mapEntryPeer.second.gamestates )
+        delete mapEntryGamestate.second;
     }
 //     this->trafficControl_->destroy();
@@ -107,11 +105,10 @@
     if( this->gamestateQueue.empty() )
         return true;
-    std::map<unsigned int, packet::Gamestate*>::iterator it;
     // now push only the most recent gamestates we received (ignore obsolete ones)
-    for(it = gamestateQueue.begin(); it!=gamestateQueue.end(); it++)
-    {
-      OrxVerify(processGamestate(it->second), "ERROR: could not process Gamestate");
-      sendAck( it->second->getID(), it->second->getPeerID() );
-      delete it->second;
+    for(const auto& mapEntry : gamestateQueue)
+    {
+      OrxVerify(processGamestate(mapEntry.second), "ERROR: could not process Gamestate");
+      sendAck( mapEntry.second->getID(), mapEntry.second->getPeerID() );
+      delete mapEntry.second;
     }
     // now clear the queue
@@ -177,17 +174,16 @@
     std::vector<packet::Gamestate*> peerGamestates;
     
-    std::map<uint32_t, peerInfo>::iterator peerIt;
-    for( peerIt=peerMap_.begin(); peerIt!=peerMap_.end(); ++peerIt )
-    {
-      if( !peerIt->second.isSynched )
+    for( const auto& mapEntry : peerMap_ )
+    {
+      if( !mapEntry.second.isSynched )
       {
         orxout(verbose_more, context::network) << "Server: not sending gamestate" << endl;
         continue;
       }
-      orxout(verbose_more, context::network) << "client id: " << peerIt->first << endl;
+      orxout(verbose_more, context::network) << "client id: " << mapEntry.first << endl;
       orxout(verbose_more, context::network) << "Server: doing gamestate gamestate preparation" << endl;
-      int peerID = peerIt->first; //get client id
-
-      unsigned int lastAckedGamestateID = peerIt->second.lastAckedGamestateID;
+      int peerID = mapEntry.first; //get client id
+
+      unsigned int lastAckedGamestateID = mapEntry.second.lastAckedGamestateID;
 
       packet::Gamestate* baseGamestate=nullptr;
@@ -340,8 +336,7 @@
   {
     assert(peerMap_.find(peerID)!=peerMap_.end());
-    std::map<uint32_t, packet::Gamestate*>::iterator peerIt;
-    for( peerIt = peerMap_[peerID].gamestates.begin(); peerIt!=peerMap_[peerID].gamestates.end(); ++peerIt )
-    {
-      delete peerIt->second;
+    for( const auto& mapEntry : peerMap_[peerID].gamestates )
+    {
+      delete mapEntry.second;
     }
     peerMap_.erase(peerMap_.find(peerID));
Index: code/branches/cpp11_v2/src/libraries/network/Host.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/Host.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/Host.cc	(revision 10919)
@@ -107,6 +107,6 @@
   void Host::doReceiveChat(const std::string& message, unsigned int sourceID, unsigned int targetID)
   {
-    for (ObjectList<NetworkChatListener>::iterator it = ObjectList<NetworkChatListener>::begin(); it != ObjectList<NetworkChatListener>::end(); ++it)
-      it->incomingChat(message, sourceID);
+    for (NetworkChatListener* listener : ObjectList<NetworkChatListener>())
+      listener->incomingChat(message, sourceID);
   }
 
Index: code/branches/cpp11_v2/src/libraries/network/MasterServer.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/MasterServer.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/MasterServer.cc	(revision 10919)
@@ -49,15 +49,11 @@
   MasterServer::listServers( void )
   {
-    /* get an iterator */
-    std::list<ServerListElem>::iterator i;
-
     /* print list header */
     orxout(user_info) << "List of connected servers" << std::endl;
 
     /* loop through list elements */
-    for( i = MasterServer::getInstance()->mainlist.serverlist.begin();
-      i != MasterServer::getInstance()->mainlist.serverlist.end(); ++i )
+    for( const ServerListElem& elem : MasterServer::getInstance()->mainlist.serverlist )
     {
-      orxout(user_info) << "  " << (*i).ServerInfo.getServerIP() << std::endl;
+      orxout(user_info) << "  " << elem.ServerInfo.getServerIP() << std::endl;
     }
 
@@ -112,17 +108,13 @@
   MasterServer::helper_sendlist( ENetEvent *event )
   {
-    /* get an iterator */
-    std::list<ServerListElem>::iterator i;
-
     /* packet holder */
     ENetPacket *reply;
 
     /* loop through list elements */
-    for( i = mainlist.serverlist.begin(); i
-        != mainlist.serverlist.end(); ++i )
+    for( const ServerListElem& elem : mainlist.serverlist )
     {
       /* send this particular server */
       /* build reply string */
-      int packetlen = MSPROTO_SERVERLIST_ITEM_LEN + 1 + (*i).ServerInfo.getServerIP().length() + 1 + (*i).ServerInfo.getServerName().length() + 1 + sizeof((*i).ServerInfo.getClientNumber()) + 1;
+      int packetlen = MSPROTO_SERVERLIST_ITEM_LEN + 1 + elem.ServerInfo.getServerIP().length() + 1 + elem.ServerInfo.getServerName().length() + 1 + sizeof(elem.ServerInfo.getClientNumber()) + 1;
       char *tosend = (char *)calloc(packetlen ,1 );
       if( !tosend )
@@ -131,5 +123,5 @@
       }
       sprintf( tosend, "%s %s %s %u", MSPROTO_SERVERLIST_ITEM,
-          (*i).ServerInfo.getServerIP().c_str(), (*i).ServerInfo.getServerName().c_str(), (*i).ServerInfo.getClientNumber());
+          elem.ServerInfo.getServerIP().c_str(), elem.ServerInfo.getServerName().c_str(), elem.ServerInfo.getClientNumber());
 
       /* create packet from it */
@@ -167,21 +159,17 @@
   MasterServer::helper_cleanupServers( void )
   {
-    /* get an iterator */
-    std::list<ServerListElem>::iterator i;
-
     if( mainlist.serverlist.size() == 0 )
       return;
 
     /* loop through list elements */
-    for( i = mainlist.serverlist.begin(); i
-        != mainlist.serverlist.end(); ++i )
+    for( const ServerListElem& elem : mainlist.serverlist )
     { /* see if we have a disconnected peer */
-      if( (*i).peer &&
-         ((*i).peer->state == ENET_PEER_STATE_DISCONNECTED ||
-          (*i).peer->state == ENET_PEER_STATE_ZOMBIE ))
+      if( elem.peer &&
+         (elem.peer->state == ENET_PEER_STATE_DISCONNECTED ||
+          elem.peer->state == ENET_PEER_STATE_ZOMBIE ))
       {
         /* Remove it from the list */
-        orxout(internal_warning) << (char*)(*i).peer->data << " timed out.\n";
-        mainlist.delServerByName( (*i).ServerInfo.getServerName() );
+        orxout(internal_warning) << (char*)elem.peer->data << " timed out.\n";
+        mainlist.delServerByName( elem.ServerInfo.getServerName() );
 
         /* stop iterating, we manipulated the list */
Index: code/branches/cpp11_v2/src/libraries/network/PeerList.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/PeerList.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/PeerList.cc	(revision 10919)
@@ -65,12 +65,10 @@
   bool
   PeerList::remPeerByAddr( ENetAddress addr )
-  { /* get an iterator */
-    std::list<ENetPeer *>::iterator i;
-
+  {
     /* loop through list elements */
-    for( i = peerlist.begin(); i != peerlist.end(); ++i )
-      if( !sub_compAddr((*i)->address, addr ) )
+    for( ENetPeer* peer : peerlist )
+      if( !sub_compAddr(peer->address, addr ) )
       { /* found this name, remove and quit */
-        this->peerlist.remove( *i );
+        this->peerlist.remove( peer );
         return true;
       }
@@ -82,12 +80,10 @@
   ENetPeer *
   PeerList::findPeerByAddr( ENetAddress addr )
-  { /* get an iterator */
-    std::list<ENetPeer *>::iterator i;
-
+  {
     /* loop through list elements */
-    for( i = peerlist.begin(); i != peerlist.end(); ++i )
-      if( !sub_compAddr((*i)->address, addr ) )
+    for( ENetPeer* peer : peerlist )
+      if( !sub_compAddr(peer->address, addr ) )
         /* found this name, remove and quit */
-        return *i;
+        return peer;
 
     /* not found */
Index: code/branches/cpp11_v2/src/libraries/network/Server.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/Server.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/Server.cc	(revision 10919)
@@ -232,8 +232,7 @@
   {
     std::vector<packet::Gamestate*> gamestates = GamestateManager::getGamestates();
-    std::vector<packet::Gamestate*>::iterator it;
-    for( it = gamestates.begin(); it != gamestates.end(); ++it )
+    for( packet::Gamestate* gamestate : gamestates )
     {
-      (*it)->send(static_cast<Host*>(this));
+      gamestate->send(static_cast<Host*>(this));
     }
     return true;
@@ -434,7 +433,6 @@
       return true;
 
-    std::vector<uint32_t>::iterator it;
-    for( it=this->clientIDs_.begin(); it!=this->clientIDs_.end(); ++it )
-      if( *it == targetID )
+    for( uint32_t id : this->clientIDs_ )
+      if( id == targetID )
         return true;
 
Index: code/branches/cpp11_v2/src/libraries/network/packet/ClassID.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/packet/ClassID.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/packet/ClassID.cc	(revision 10919)
@@ -55,7 +55,6 @@
 
   //calculate total needed size (for all strings and integers)
-  std::map<std::string, Identifier*>::const_iterator it = IdentifierManager::getInstance().getIdentifierByStringMap().begin();
-  for(;it != IdentifierManager::getInstance().getIdentifierByStringMap().end();++it){
-    id = it->second;
+  for(const auto& mapEntry : IdentifierManager::getInstance().getIdentifierByStringMap()){
+    id = mapEntry.second;
     if(id == nullptr || !id->hasFactory())
       continue;
Index: code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.cc	(revision 10919)
@@ -213,14 +213,13 @@
   {
     std::list<uint32_t> v1;
-    ObjectList<Synchronisable>::iterator it;
-    for (it = ObjectList<Synchronisable>::begin(); it != ObjectList<Synchronisable>::end(); ++it)
-    {
-      if (it->getObjectID() == OBJECTID_UNKNOWN)
-      {
-        if (it->objectMode_ != 0x0)
+    for (Synchronisable* synchronisable : ObjectList<Synchronisable>())
+    {
+      if (synchronisable->getObjectID() == OBJECTID_UNKNOWN)
+      {
+        if (synchronisable->objectMode_ != 0x0)
         {
           orxout(user_error, context::packets) << "Found object with OBJECTID_UNKNOWN on the client with objectMode != 0x0!" << endl;
           orxout(user_error, context::packets) << "Possible reason for this error: Client created a synchronized object without the Server's approval." << endl;
-          orxout(user_error, context::packets) << "Objects class: " << it->getIdentifier()->getName() << endl;
+          orxout(user_error, context::packets) << "Objects class: " << synchronisable->getIdentifier()->getName() << endl;
           assert(false);
         }
@@ -228,8 +227,7 @@
       else
       {
-        std::list<uint32_t>::iterator it2;
-        for (it2 = v1.begin(); it2 != v1.end(); ++it2)
+        for (uint32_t id : v1)
         {
-          if (it->getObjectID() == *it2)
+          if (synchronisable->getObjectID() == id)
           {
             orxout(user_error, context::packets) << "Found duplicate objectIDs on the client!" << endl
@@ -239,5 +237,5 @@
           }
         }
-        v1.push_back(it->getObjectID());
+        v1.push_back(synchronisable->getObjectID());
       }
     }
@@ -762,10 +760,8 @@
   uint32_t size = 0;
   uint32_t nrOfVariables = 0;
-    // get the start of the Synchronisable list
-  ObjectList<Synchronisable>::iterator it;
     // get total size of gamestate
-  for(it = ObjectList<Synchronisable>::begin(); it; ++it){
-    size+=it->getSize(id, mode); // size of the actual data of the synchronisable
-    nrOfVariables += it->getNrOfVariables();
+  for(Synchronisable* synchronisable : ObjectList<Synchronisable>()){
+    size+=synchronisable->getSize(id, mode); // size of the actual data of the synchronisable
+    nrOfVariables += synchronisable->getNrOfVariables();
   }
 //   orxout() << "allocating " << nrOfVariables << " ints" << endl;
Index: code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.h	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.h	(revision 10919)
@@ -50,10 +50,10 @@
         void          send( ENetPeer* peer );
         void          setServerName(std::string name) { this->serverName_ = name; }
-        std::string   getServerName() { return this->serverName_; }
+        std::string   getServerName() const { return this->serverName_; }
         void          setServerIP( std::string IP ) { this->serverIP_ = IP; }
-        std::string   getServerIP() { return this->serverIP_; }
+        std::string   getServerIP() const { return this->serverIP_; }
         void          setClientNumber( int clientNumber ) { this->clientNumber_ = clientNumber; }
-        int           getClientNumber() { return this->clientNumber_; }
-        uint32_t      getServerRTT() { return this->serverRTT_; }
+        int           getClientNumber() const { return this->clientNumber_; }
+        uint32_t      getServerRTT() const { return this->serverRTT_; }
 
       private:
Index: code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc	(revision 10918)
+++ code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc	(revision 10919)
@@ -266,5 +266,4 @@
     assert(this->classID_==this->getIdentifier()->getNetworkID());
     assert(this->objectID_!=OBJECTID_UNKNOWN);
-    std::vector<SynchronisableVariableBase*>::iterator i;
 
     // start copy header
@@ -276,7 +275,7 @@
 //     orxout(verbose, context::network) << "objectid: " << this->objectID_ << ":";
     // copy to location
-    for(i=syncList_.begin(); i!=syncList_.end(); ++i)
-    {
-      uint32_t varsize = (*i)->getData( mem, mode );
+    for(SynchronisableVariableBase* variable : syncList_)
+    {
+      uint32_t varsize = variable->getData( mem, mode );
 //       orxout(verbose, context::network) << " " << varsize;
       tempsize += varsize;
@@ -348,9 +347,8 @@
       assert( this->getContextID() == syncHeader2.getContextID() );
       mem += SynchronisableHeader::getSize();
-      std::vector<SynchronisableVariableBase *>::iterator i;
-      for(i=syncList_.begin(); i!=syncList_.end(); ++i)
+      for(SynchronisableVariableBase* variable : syncList_)
       {
         assert( mem <= data+syncHeader2.getDataSize()+SynchronisableHeader::getSize() ); // always make sure we don't exceed the datasize in our stream
-        (*i)->putData( mem, mode, forceCallback );
+        variable->putData( mem, mode, forceCallback );
       }
       assert(mem == data+syncHeaderLight.getDataSize()+SynchronisableHeader::getSize() );
@@ -388,8 +386,7 @@
     assert( mode==state_ );
     tsize += this->dataSize_;
-    std::vector<SynchronisableVariableBase*>::iterator i;
-    for(i=stringList_.begin(); i!=stringList_.end(); ++i)
-    {
-      tsize += (*i)->getSize( mode );
+    for(SynchronisableVariableBase* variable : stringList_)
+    {
+      tsize += variable->getSize( mode );
     }
     return tsize;
