Index: code/branches/cpp11_v2/src/orxonox/weaponsystem/Munition.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/weaponsystem/Munition.cc	(revision 10817)
+++ 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 10817)
+++ 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 10817)
+++ 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 10817)
+++ 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 10817)
+++ 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();
     }
 
