Index: orxonox/trunk/src/subprojects/benchmark.cc
===================================================================
--- orxonox/trunk/src/subprojects/benchmark.cc	(revision 4166)
+++ orxonox/trunk/src/subprojects/benchmark.cc	(revision 4554)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -16,5 +16,5 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 
@@ -26,5 +26,5 @@
 
 
-#if defined __linux__ 
+#if defined __linux__
 
 #include "list.h"
@@ -59,6 +59,6 @@
   dt = end - ini;
 
-  int type = -1; 
-  /* type   -1 == all 
+  int type = -1;
+  /* type   -1 == all
      type    0 == framework
      type    1 == vector
@@ -69,5 +69,5 @@
     {
       /* framework test*/
-      
+
       printf("Generating Objects:\t\t\t\t\t%i\n", ITERATIONS);
       /* ************WorldEntity class test************** */
@@ -75,45 +75,45 @@
       int i = 0;
       unsigned long mittel = 0;
-      
-      for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  WorldEntity* w = new WorldEntity();
-	  
-	  rdtscl(end);
-	  delete w;
-	  mittel += (end - ini - dt);
-	}
+
+      for(i = 0; i < ITERATIONS; ++i)
+        {
+          rdtscl(ini);
+
+          WorldEntity* w = new WorldEntity();
+
+          rdtscl(end);
+          delete w;
+          mittel += (end - ini - dt);
+        }
       float mi = mittel / (float)ITERATIONS;
       printf(" Generate a WorldEntity object:\t\t%11.2f\n", mi);
-      
+
       /*
-	mittel = 0;
-	for(i = 0; i < ITERATIONS; ++i)
-	{
-	rdtscl(ini);
-	
-	WorldEntity* w = new Primitive(P_SPHERE);
-	
-	rdtscl(end);
-	delete w;
-	mittel += (end - ini - dt);
-	}
-	mi = mittel / (float)ITERATIONS;
-	printf(" Generate a Primitive  object:\t\t%11.2f\n", mi);
+        mittel = 0;
+        for(i = 0; i < ITERATIONS; ++i)
+        {
+        rdtscl(ini);
+
+        WorldEntity* w = new Primitive(P_SPHERE);
+
+        rdtscl(end);
+        delete w;
+        mittel += (end - ini - dt);
+        }
+        mi = mittel / (float)ITERATIONS;
+        printf(" Generate a Primitive  object:\t\t%11.2f\n", mi);
       */
 
       mittel = 0;
       for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  Vector* v = new Vector();
-	  
-	  rdtscl(end);
-	  delete v;
-	  mittel += (end - ini - dt);
-	}
+        {
+          rdtscl(ini);
+
+          Vector* v = new Vector();
+
+          rdtscl(end);
+          delete v;
+          mittel += (end - ini - dt);
+        }
       mi = mittel / (float)ITERATIONS;
       printf(" Generate a Vector object:\t\t%11.2f\n", mi);
@@ -122,13 +122,13 @@
      mittel = 0;
       for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  Quaternion* q = new Quaternion();
-	  
-	  rdtscl(end);
-	  delete q;
-	  mittel += (end - ini - dt);
-	}
+        {
+          rdtscl(ini);
+
+          Quaternion* q = new Quaternion();
+
+          rdtscl(end);
+          delete q;
+          mittel += (end - ini - dt);
+        }
       mi = mittel / (float)ITERATIONS;
       printf(" Generate a Quaternion object:\t\t%11.2f\n", mi);
@@ -141,12 +141,12 @@
       w = new WorldEntity();
       for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  w->tick(0.0f);
-
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	  }
+        {
+          rdtscl(ini);
+
+          w->tick(0.0f);
+
+          rdtscl(end);
+          mittel += (end - ini - dt);
+          }
       //delete w;
       mi = mittel / (float)ITERATIONS;
@@ -157,58 +157,58 @@
       WorldEntity wo;
       for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  wo.tick(0.0f);
-	   
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	  }
+        {
+          rdtscl(ini);
+
+          wo.tick(0.0f);
+
+          rdtscl(end);
+          mittel += (end - ini - dt);
+          }
       //delete w;
       mi = mittel / (float)ITERATIONS;
       printf(" Inl virt funct tick() of WE v2: \t%11.2f\n", mi);
 
-      
+
       mittel = 0;
       BaseObject* bo = new BaseObject();
       for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  bo->isFinalized();
-	   
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	  }
+        {
+          rdtscl(ini);
+
+          bo->isFinalized();
+
+          rdtscl(end);
+          mittel += (end - ini - dt);
+          }
       //delete w;
       mi = mittel / (float)ITERATIONS;
       printf(" Inl funct BaseObject::isFinazlized(): \t%11.2f\n", mi);
 
-      
+
       tList<WorldEntity>* list = new tList<WorldEntity>();
 
-      
+
       /* ************Primitvie class test************** */
       list = new tList<WorldEntity>();
- 
-      
+
+
       /*
-	mittel = 0;
-	w = new Primitive(P_SPHERE);
-	for(i = 0; i < ITERATIONS; ++i)
-	{
-	rdtscl(ini);
-	
-	w->tick(0.0f);
-	
-	rdtscl(end);
-	mittel += (end - ini - dt);
-	}
-	mi = mittel / (float)ITERATIONS;
-	printf(" Call function tick() of Prim:\t\t%11.2f\n", mi);
+        mittel = 0;
+        w = new Primitive(P_SPHERE);
+        for(i = 0; i < ITERATIONS; ++i)
+        {
+        rdtscl(ini);
+
+        w->tick(0.0f);
+
+        rdtscl(end);
+        mittel += (end - ini - dt);
+        }
+        mi = mittel / (float)ITERATIONS;
+        printf(" Call function tick() of Prim:\t\t%11.2f\n", mi);
       */
-      
+
     }
-  
+
   if(type == 1 || type == -1)
     {
@@ -218,5 +218,5 @@
       Vector* b = new Vector(0.4, 2.5, 6.2);
       Vector* c = new Vector();
-      
+
       unsigned long mittel, ini, end;
       float mi;
@@ -225,27 +225,27 @@
       mittel = 0;
       for(i = 0; i < VECTOR_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  *c = *a + *b;
-	   
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
+        {
+          rdtscl(ini);
+
+          *c = *a + *b;
+
+          rdtscl(end);
+          mittel += (end - ini - dt);
+        }
       mi = mittel / (float)VECTOR_MAX;
       printf(" Addition of two vectors:\t\t%11.2f\n", mi);
-      
+
       // multiplikation
 
       mittel = 0;
       for(i = 0; i < VECTOR_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  *c = a->cross( *b);
-	   
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
+        {
+          rdtscl(ini);
+
+          *c = a->cross( *b);
+
+          rdtscl(end);
+          mittel += (end - ini - dt);
+        }
       mi = mittel / (float)VECTOR_MAX;
       printf(" CrossMult of two vectors:\t\t%11.2f\n", mi);
@@ -260,5 +260,5 @@
       Quaternion* b = new Quaternion();
       Quaternion* c = new Quaternion();
-      
+
       unsigned long mittel, ini, end;
       float mi;
@@ -269,63 +269,63 @@
       Vector* qb = new Vector(3.5, 6.1, 4.3);
       for(i = 0; i < VECTOR_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  Quaternion* qu = new Quaternion(*qa, *qb);
-	  
-	  rdtscl(end);
-	  delete qu;
-	  mittel += (end - ini - dt);
-	}
+        {
+          rdtscl(ini);
+
+          Quaternion* qu = new Quaternion(*qa, *qb);
+
+          rdtscl(end);
+          delete qu;
+          mittel += (end - ini - dt);
+        }
       delete a;
       delete b;
       mi = mittel / (float)VECTOR_MAX;
       printf(" Gen. quatern. betw. two vectors:\t%11.2f\n", mi);
-      
-      
+
+
       // multiplication
       mittel = 0;
       for(i = 0; i < VECTOR_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  *c = *a * *b;
-	  
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
+        {
+          rdtscl(ini);
+
+          *c = *a * *b;
+
+          rdtscl(end);
+          mittel += (end - ini - dt);
+        }
       mi = mittel / (float)VECTOR_MAX;
       printf(" Multiplying two quat.(=rot): a * b\t%11.2f\n", mi);
-      
-      
-      
+
+
+
       // rotating a vector by a quaternion
       mittel = 0;
       for(i = 0; i < VECTOR_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  *qa = a->apply(*qb);
-	  
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
+        {
+          rdtscl(ini);
+
+          *qa = a->apply(*qb);
+
+          rdtscl(end);
+          mittel += (end - ini - dt);
+        }
       mi = mittel / (float)VECTOR_MAX;
       printf(" Rot a vec by a quat: q->apply(v)\t%11.2f\n", mi);
-      
-      
-      
+
+
+
       // generate rotation matrix
       mittel = 0;
       float matrix[4][4];
       for(i = 0; i < VECTOR_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  a->matrix(matrix);
-	  
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
+        {
+          rdtscl(ini);
+
+          a->matrix(matrix);
+
+          rdtscl(end);
+          mittel += (end - ini - dt);
+        }
       mi = mittel / (float)VECTOR_MAX;
       printf(" Generate rot matrix: q->matrix(m)\t%11.2f\n", mi);
@@ -337,5 +337,5 @@
       tList<char>* list = new tList<char>();
       char* name;
-      
+
       printf(" Adding[1..10] elements to list, found:\n");
       list->add("1");
@@ -349,5 +349,5 @@
       list->add("9");
       list->add("10");
-      
+
       /*give list out */
       tIterator<char>* iterator = list->getIterator();
@@ -355,12 +355,12 @@
       printf("  List Elements: \t\t");
       while( name != NULL)
-	{
-	  printf("%s,", name);
-	  name = iterator->nextElement();
-	}
+        {
+          printf("%s,", name);
+          name = iterator->nextElement();
+        }
       delete iterator;
       printf("\n");
-      
-      
+
+
       /*removing some elements from the list*/
       printf(" Removing elements [2,3,6,8,10], adding [11] now found:\n");
@@ -376,14 +376,14 @@
       printf("  List Elements: \t\t");
       while( name != NULL)
-	{
-	  printf("%s,", name);
-	  name = iterator->nextElement();
-	}
+        {
+          printf("%s,", name);
+          name = iterator->nextElement();
+        }
       delete iterator;
       printf("\n");
-      
+
       delete list;
       printf("\nChecking list performance:\t\t\t\t%i\n", LIST_MAX);
-      
+
       tList<int>* plist = new tList<int>();
       unsigned long mittel, ini, end;
@@ -392,28 +392,28 @@
       mittel = 0;
       for(i = 0; i < LIST_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  plist->add(&i);
-	  
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
+        {
+          rdtscl(ini);
+
+          plist->add(&i);
+
+          rdtscl(end);
+          mittel += (end - ini - dt);
+        }
       mi = mittel / (float)LIST_MAX;
       printf(" Adding reference to list:\t\t%11.2f\n", mi);
-      
+
       mittel = 0;
       for(i = 0; i < LIST_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  plist->remove(&i);
-	  
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
+        {
+          rdtscl(ini);
+
+          plist->remove(&i);
+
+          rdtscl(end);
+          mittel += (end - ini - dt);
+        }
       mi = mittel / (float)LIST_MAX;
       printf(" Removing 1st reference from list:\t%11.2f\n", mi);
-      
+
 
       printf("\nList operations tests: \t\t\t\t\t%i\n", LIST_MAX);
@@ -430,5 +430,5 @@
       list->add("9");
       list->add("10");
-      
+
       /*give list out */
       iterator = list->getIterator();
@@ -436,27 +436,27 @@
       printf("  List Elements: \t\t");
       while( name != NULL)
-	{
-	  printf("%s,", name);
-	  name = iterator->nextElement();
-	}
+        {
+          printf("%s,", name);
+          name = iterator->nextElement();
+        }
       delete iterator;
       printf("\n");
-      
-      
+
+
       int c = 0;
       printf(" Going trough list with nextElement(el) func: ");
       name = list->firstElement();
       while(c < 20)
-	{
-	  printf("%s,", name);
-	  name = list->nextElement(name);
-	  c++;
-	}
+        {
+          printf("%s,", name);
+          name = list->nextElement(name);
+          c++;
+        }
       printf("\n");
-      
-
-      
+
+
+
     }
-  
+
 }
 
