[Orxonox-commit 7022] r11641 - code/branches/AsteroidMining_HS17/src/modules/asteroidmining

remartin at orxonox.net remartin at orxonox.net
Mon Dec 4 18:36:35 CET 2017


Author: remartin
Date: 2017-12-04 18:36:34 +0100 (Mon, 04 Dec 2017)
New Revision: 11641

Modified:
   code/branches/AsteroidMining_HS17/src/modules/asteroidmining/AsteroidMinable.cc
Log:
Changed detail in variable sized Array definition, should now build on Jenkins, too. 

Modified: code/branches/AsteroidMining_HS17/src/modules/asteroidmining/AsteroidMinable.cc
===================================================================
--- code/branches/AsteroidMining_HS17/src/modules/asteroidmining/AsteroidMinable.cc	2017-12-04 15:38:17 UTC (rev 11640)
+++ code/branches/AsteroidMining_HS17/src/modules/asteroidmining/AsteroidMinable.cc	2017-12-04 17:36:34 UTC (rev 11641)
@@ -335,8 +335,8 @@
     massRem = massRem-num; // mass is at least one, add again below. 
 
     // Randomnised spawning points for the new asteroids
-    float phi[num] = {0.0}; // assuming that it gets initialised to 0. Add (= {0.0})?
-    float theta[num] = {0.0};
+    float phi[num]; // assuming that it gets initialised to 0. Add (= {0.0})?
+    float theta[num];
     float piG = 3.1415927410125732421875; //pi; // Math.pi ist statisch oder so. 
 
     float d_p = 2*piG/num;
@@ -376,7 +376,7 @@
     // 'Triangular', discrete probability "density" with max at the expected value massRem/num at a. a+b = c
     if(massRem>0){ // Required to avoid array of size 0 or access problems
         int c = massRem;
-        float probDensity[c] = {0.0};
+        float probDensity[c];
 
         int a = round(massRem/num);
         int b = c-a;



More information about the Orxonox-commit mailing list