Index: code/trunk/src/modules/gametypes/RaceCheckPoint.cc
===================================================================
--- code/trunk/src/modules/gametypes/RaceCheckPoint.cc	(revision 9966)
+++ code/trunk/src/modules/gametypes/RaceCheckPoint.cc	(revision 9967)
@@ -60,7 +60,4 @@
         this->bIsLast_ = false;
         this->timeLimit_ = 0;
-        //this->players_ = vector<PlayerInfo*>();
-
-        //orxout(user_status) << "test" << std::endl;
     }
 
Index: code/trunk/src/modules/gametypes/SpaceRaceController.cc
===================================================================
--- code/trunk/src/modules/gametypes/SpaceRaceController.cc	(revision 9966)
+++ code/trunk/src/modules/gametypes/SpaceRaceController.cc	(revision 9967)
@@ -149,16 +149,16 @@
      * returns a vector of static Point (checkpoints the spaceship has to reach)
      */
-    std::vector<RaceCheckPoint*> SpaceRaceController::findStaticCheckpoints(std::vector<RaceCheckPoint*> allCheckpoints)
-    {
-        std::map<RaceCheckPoint*, int> * zaehler = new std::map<RaceCheckPoint*, int>(); // counts how many times the checkpoint was reached (for simulation)
+    std::vector<RaceCheckPoint*> SpaceRaceController::findStaticCheckpoints(const std::vector<RaceCheckPoint*>& allCheckpoints)
+    {
+        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));
-        }
-        int maxWays = rekSimulationCheckpointsReached(zaehler->begin()->first, zaehler);
+            zaehler.insert(std::pair<RaceCheckPoint*, int>(allCheckpoints[i],0));
+        }
+        int maxWays = rekSimulationCheckpointsReached(zaehler.begin()->first, zaehler);
 
         std::vector<RaceCheckPoint*> returnVec;
         returnVec.clear();
-        for (std::map<RaceCheckPoint*, int>::iterator iter = zaehler->begin(); iter != zaehler->end(); iter++)
+        for (std::map<RaceCheckPoint*, int>::iterator iter = zaehler.begin(); iter != zaehler.end(); iter++)
         {
             if (iter->second == maxWays)
@@ -168,5 +168,4 @@
             }
         }
-        delete zaehler;
         return returnVec;
     }
@@ -176,5 +175,5 @@
      * return how many ways go from the given Checkpoint to the last Checkpoint (of the Game)
      */
-    int SpaceRaceController::rekSimulationCheckpointsReached(RaceCheckPoint* currentCheckpoint, std::map<RaceCheckPoint*, int>* zaehler)
+    int SpaceRaceController::rekSimulationCheckpointsReached(RaceCheckPoint* currentCheckpoint, std::map<RaceCheckPoint*, int>& zaehler)
     {
 
@@ -182,5 +181,5 @@
         {// last point reached
 
-            (*zaehler)[currentCheckpoint] += 1;
+            zaehler[currentCheckpoint] += 1;
             return 1; // 1 Way form the last point to this one
         }
@@ -199,5 +198,5 @@
                 numberOfWays += rekSimulationCheckpointsReached(findCheckpoint(*it), zaehler);
             }
-            (*zaehler)[currentCheckpoint] += numberOfWays;
+            zaehler[currentCheckpoint] += numberOfWays;
             return numberOfWays; // returns the number of ways from this point to the last one
         }
@@ -245,5 +244,5 @@
      * returns the distance between "currentPosition" and the next static checkpoint that can be reached from "currentCheckPoint"
      */
-    float SpaceRaceController::recCalculateDistance(RaceCheckPoint* currentCheckPoint, Vector3 currentPosition)
+    float SpaceRaceController::recCalculateDistance(RaceCheckPoint* currentCheckPoint, const Vector3& currentPosition)
     {
         // find: looks if the currentCheckPoint is a staticCheckPoint (staticCheckPoint is the same as: static Point)
@@ -295,5 +294,5 @@
     }
 
-    /*RaceCheckPoint* SpaceRaceController::addVirtualCheckPoint( RaceCheckPoint* previousCheckpoint, int indexFollowingCheckPoint , Vector3 virtualCheckPointPosition )
+    /*RaceCheckPoint* SpaceRaceController::addVirtualCheckPoint( RaceCheckPoint* previousCheckpoint, int indexFollowingCheckPoint , const Vector3& virtualCheckPointPosition )
     {
         orxout()<<"add VCP at"<<virtualCheckPointPosition.x<<", "<<virtualCheckPointPosition.y<<", "<<virtualCheckPointPosition.z<<endl;
@@ -393,5 +392,5 @@
 
     // True if a coordinate of 'pointToPoint' is smaller then the corresponding coordinate of 'groesse'
-    bool SpaceRaceController::vergleicheQuader(Vector3 pointToPoint, Vector3 groesse)
+    bool SpaceRaceController::vergleicheQuader(const Vector3& pointToPoint, const Vector3& groesse)
     {
         if(abs(pointToPoint.x) < groesse.x)
@@ -405,5 +404,5 @@
     }
 
-    bool SpaceRaceController::directLinePossible(RaceCheckPoint* racepoint1, RaceCheckPoint* racepoint2,std::vector<StaticEntity*> allObjects)
+    bool SpaceRaceController::directLinePossible(RaceCheckPoint* racepoint1, RaceCheckPoint* racepoint2, const std::vector<StaticEntity*>& allObjects)
     {
 
@@ -413,5 +412,5 @@
         btScalar radiusObject;
 
-        for (std::vector<StaticEntity*>::iterator it = allObjects.begin(); it != allObjects.end(); ++it)
+        for (std::vector<StaticEntity*>::const_iterator it = allObjects.begin(); it != allObjects.end(); ++it)
         {
             for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape) != 0; everyShape++)
@@ -434,5 +433,5 @@
     }
 
-    /*void SpaceRaceController::computeVirtualCheckpoint(RaceCheckPoint* racepoint1, RaceCheckPoint* racepoint2, std::vector<StaticEntity*> allObjects)
+    /*void SpaceRaceController::computeVirtualCheckpoint(RaceCheckPoint* racepoint1, RaceCheckPoint* racepoint2, const std::vector<StaticEntity*>& allObjects)
     {
         Vector3 cP1ToCP2=(racepoint2->getPosition()-racepoint1->getPosition()) / (racepoint2->getPosition()-racepoint1->getPosition()).length(); //unit Vector
Index: code/trunk/src/modules/gametypes/SpaceRaceController.h
===================================================================
--- code/trunk/src/modules/gametypes/SpaceRaceController.h	(revision 9966)
+++ code/trunk/src/modules/gametypes/SpaceRaceController.h	(revision 9967)
@@ -41,23 +41,23 @@
         public:
             SpaceRaceController(Context* context);
+            virtual ~SpaceRaceController();
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            virtual ~SpaceRaceController();
             virtual void tick(float dt);
 
         private:
-            float recCalculateDistance(RaceCheckPoint*, Vector3 currentPosition);
+            float recCalculateDistance(RaceCheckPoint*, const Vector3& currentPosition);
             float distanceSpaceshipToCheckPoint(RaceCheckPoint*);
             RaceCheckPoint* nextPointFind(RaceCheckPoint*);
             RaceCheckPoint* adjustNextPoint();
-            std::vector<RaceCheckPoint*> findStaticCheckpoints(std::vector<RaceCheckPoint*>);
+            std::vector<RaceCheckPoint*> findStaticCheckpoints(const std::vector<RaceCheckPoint*>&);
             std::vector<RaceCheckPoint*> staticCheckpoints();
-            int rekSimulationCheckpointsReached(RaceCheckPoint*, std::map<RaceCheckPoint*, int>*);
+            int rekSimulationCheckpointsReached(RaceCheckPoint*, std::map<RaceCheckPoint*, int>&);
             // same as SpaceRaceManager, but needed to add virtuell Checkpoints ( Checkpoints which don't exist but needed to avoid collisions with big Objects)
             RaceCheckPoint* findCheckpoint(int index) const;
-            //RaceCheckPoint * addVirtualCheckPoint(RaceCheckPoint*, int , Vector3);
+            //RaceCheckPoint * addVirtualCheckPoint(RaceCheckPoint*, int , const Vector3&);
             //void placeVirtualCheckpoints(RaceCheckPoint*, RaceCheckPoint*);
-            bool vergleicheQuader(Vector3, Vector3);
-            bool directLinePossible(RaceCheckPoint*, RaceCheckPoint*, std::vector<StaticEntity*>);
-            //void computeVirtualCheckpoint(RaceCheckPoint*, RaceCheckPoint*, std::vector<StaticEntity*>);
+            bool vergleicheQuader(const Vector3&, const Vector3&);
+            bool directLinePossible(RaceCheckPoint*, RaceCheckPoint*, const std::vector<StaticEntity*>&);
+            //void computeVirtualCheckpoint(RaceCheckPoint*, RaceCheckPoint*, const std::vector<StaticEntity*>&);
 
             std::vector<RaceCheckPoint*> staticRacePoints_;
