Index: code/trunk/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDRadar.cc	(revision 11052)
+++ code/trunk/src/modules/overlays/hud/HUDRadar.cc	(revision 11071)
@@ -65,8 +65,8 @@
         this->setMaximumDotSize3D(0.07f);
 
-        this->shapeMaterials_[RadarViewable::Dot]      = "RadarDot.png";
-        this->shapeMaterials_[RadarViewable::Triangle] = "RadarTriangle.png";
-        this->shapeMaterials_[RadarViewable::Square]   = "RadarSquare.png";
-        this->owner_ = 0;
+        this->shapeMaterials_[RadarViewable::Shape::Dot]      = "RadarDot.png";
+        this->shapeMaterials_[RadarViewable::Shape::Triangle] = "RadarTriangle.png";
+        this->shapeMaterials_[RadarViewable::Shape::Square]   = "RadarSquare.png";
+        this->owner_ = nullptr;
 
         this->map3DFront_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
@@ -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 (const auto& mapEntry : this->radarObjects_)
+            {
+                Ogre::OverlayManager::getSingleton().destroyOverlayElement(mapEntry.second);
             }
         }
@@ -166,7 +165,6 @@
     {
         const std::set<RadarViewable*>& objectSet = this->getCreator()->getScene()->getRadar()->getRadarObjects();
-        std::set<RadarViewable*>::const_iterator it;
-        for( it=objectSet.begin(); it!=objectSet.end(); ++it )
-            this->addObject(*it);
+        for( RadarViewable* viewable : objectSet )
+            this->addObject(viewable);
         this->radarTick(0);
     }
@@ -184,6 +182,4 @@
 
         // update the distances for all objects
-        std::map<RadarViewable*,Ogre::PanelOverlayElement*>::iterator it;
-
 
         if(RadarMode_)
@@ -202,8 +198,8 @@
         }
 
-        for( it = this->radarObjects_.begin(); it != this->radarObjects_.end(); ++it )
+        for( const auto& mapEntry : this->radarObjects_ )
         {
             // Make sure the object really is a WorldEntity
-            const WorldEntity* wePointer = it->first->getWorldEntity();
+            const WorldEntity* wePointer = mapEntry.first->getWorldEntity();
             if( !wePointer )
             {
@@ -211,5 +207,5 @@
                 assert(0);
             }
-            bool isFocus = (it->first == focusObject);
+            bool isFocus = (mapEntry.first == focusObject);
             // set size to fit distance...
             float distance = (wePointer->getWorldPosition() - this->owner_->getPosition()).length();
@@ -218,8 +214,8 @@
             float size;
             if(RadarMode_)
-                size = maximumDotSize3D_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale();
+                size = maximumDotSize3D_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * mapEntry.first->getRadarObjectScale();
             else
-                size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale();
-            it->second->setDimensions(size, size);
+                size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * mapEntry.first->getRadarObjectScale();
+            mapEntry.second->setDimensions(size, size);
 
             // calc position on radar...
@@ -235,7 +231,7 @@
                 int zOrder = determineMap3DZOrder(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), detectionLimit_);
                 if(overXZPlain == false /*&& (it->second->getZOrder() >  100 * this->overlay_->getZOrder())*/) // it appears that zOrder of attached Overlayelements is 100 times the zOrder of the Overlay
-                    it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 70 + zOrder);
+                    mapEntry.second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 70 + zOrder);
                 if(overXZPlain == true /*&& (it->second->getZOrder() <= 100 * this->overlay_->getZOrder())*/)
-                    it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 70 + zOrder);
+                    mapEntry.second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 70 + zOrder);
             }
             else
@@ -243,10 +239,10 @@
 
             coord *= math::pi / 3.5f; // small adjustment to make it fit the texture
-            it->second->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f);
+            mapEntry.second->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f);
 
             if( distance < detectionLimit_ || detectionLimit_ < 0 )
-                it->second->show();
+                mapEntry.second->show();
             else
-                it->second->hide();
+                mapEntry.second->hide();
 
             // if this object is in focus, then set the focus marker
@@ -256,5 +252,5 @@
                 this->marker_->setPosition((1.0f + coord.x - size * 1.5f) * 0.5f, (1.0f - coord.y - size * 1.5f) * 0.5f);
                 if(RadarMode_)
-                    this->marker_->_notifyZOrder(it->second->getZOrder() -1);
+                    this->marker_->_notifyZOrder(mapEntry.second->getZOrder() -1);
                 this->marker_->show();
             }
