Index: code/branches/cpp11_v3/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/cpp11_v3/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 11053)
+++ code/branches/cpp11_v3/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 11054)
@@ -48,5 +48,5 @@
     RegisterClass(SpaceShip);
 
-    SpaceShip::SpaceShip(Context* context) : Pawn(context), boostBlur_(NULL)
+    SpaceShip::SpaceShip(Context* context) : Pawn(context), boostBlur_(nullptr)
     {
         RegisterObject(SpaceShip);
@@ -160,6 +160,6 @@
 
         // Run the engines
-        for(std::vector<Engine*>::iterator it = this->engineList_.begin(); it != this->engineList_.end(); it++)
-            (*it)->run(dt);
+        for(Engine* engine : this->engineList_)
+            engine->run(dt);
 
         if (this->hasLocalController())
@@ -198,5 +198,5 @@
             if(this->bEnableMotionBlur_)
             {
-                if (this->boostBlur_ == NULL && this->hasLocalController() && this->hasHumanController())
+                if (this->boostBlur_ == nullptr && this->hasLocalController() && this->hasHumanController())
                 {
                     this->boostBlur_ = new Shader(this->getScene()->getSceneManager());
@@ -325,5 +325,5 @@
     void SpaceShip::addEngine(orxonox::Engine* engine)
     {
-        OrxAssert(engine != NULL, "The engine cannot be NULL.");
+        OrxAssert(engine != nullptr, "The engine cannot be nullptr.");
         this->engineList_.push_back(engine);
         engine->addToSpaceShip(this);
@@ -333,12 +333,12 @@
     @brief
         Check whether the SpaceShip has a particular Engine.
-    @param engine
+    @param search
         A pointer to the Engine to be checked.
     */
-    bool SpaceShip::hasEngine(Engine* engine) const
-    {
-        for(unsigned int i = 0; i < this->engineList_.size(); i++)
-        {
-            if(this->engineList_[i] == engine)
+    bool SpaceShip::hasEngine(Engine* search) const
+    {
+        for(Engine* engine : this->engineList_)
+        {
+            if(engine == search)
                 return true;
         }
@@ -350,10 +350,10 @@
         Get the i-th Engine of the SpaceShip.
     @return
-        Returns a pointer to the i-the Engine. NULL if there is no Engine with that index.
+        Returns a pointer to the i-the Engine. nullptr if there is no Engine with that index.
     */
     Engine* SpaceShip::getEngine(unsigned int i)
     {
         if(this->engineList_.size() >= i)
-            return NULL;
+            return nullptr;
         else
             return this->engineList_[i];
@@ -366,14 +366,14 @@
         The name of the engine to be returned.
     @return
-        Pointer to the engine with the given name, or NULL if not found.
+        Pointer to the engine with the given name, or nullptr if not found.
     */
     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(Engine* engine : this->engineList_)
+            if(engine->getName() == name)
+                return engine;
 
         orxout(internal_warning) << "Couldn't find Engine with name \"" << name << "\"." << endl;
-        return NULL;
+        return nullptr;
     }
 
@@ -416,6 +416,6 @@
     void SpaceShip::addSpeedFactor(float factor)
     {
-        for(unsigned int i=0; i<this->engineList_.size(); i++)
-            this->engineList_[i]->addSpeedMultiply(factor);
+        for(Engine* engine : this->engineList_)
+            engine->addSpeedMultiply(factor);
     }
 
@@ -428,6 +428,6 @@
     void SpaceShip::addSpeed(float speed)
     {
-        for(unsigned int i=0; i<this->engineList_.size(); i++)
-            this->engineList_[i]->addSpeedAdd(speed);
+        for(Engine* engine : this->engineList_)
+            engine->addSpeedAdd(speed);
     }
 
@@ -456,8 +456,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(Engine* engine : this->engineList_)
+        {
+            if(engine->getMaxSpeedFront() > speed)
+                speed = engine->getMaxSpeedFront();
         }
         return speed;
@@ -485,8 +485,8 @@
     void SpaceShip::changedEnableMotionBlur()
     {
-        if (!this->bEnableMotionBlur_ && this->boostBlur_ != NULL)
+        if (!this->bEnableMotionBlur_ && this->boostBlur_ != nullptr)
         {
             delete this->boostBlur_;
-            this->boostBlur_ = NULL;
+            this->boostBlur_ = nullptr;
         }
     }
@@ -514,5 +514,5 @@
             Camera* camera = this->getCamera();
             //Shaking Camera effect
-            if (camera != 0)
+            if (camera != nullptr)
                 camera->setOrientation(Vector3::UNIT_X, angle);
 
@@ -530,5 +530,5 @@
     {
         Camera* camera = CameraManager::getInstance().getActiveCamera();
-        if(camera != NULL)
+        if(camera != nullptr)
         {
             this->cameraOriginalPosition_ = camera->getPosition();
@@ -546,5 +546,5 @@
         {
             Camera *camera = this->getCamera();
-            if (camera == 0)
+            if (camera == nullptr)
             {
                 orxout(internal_warning) << "Failed to reset camera!" << endl;
