Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics : I activated -pedantic for a quick pass
[simgrid.git] / src / kernel / routing / TorusZone.cpp
index 11e544c..971fd4c 100644 (file)
@@ -108,8 +108,8 @@ void TorusZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs*
    * both arrays, we can easily assess whether we need to route into this dimension or not.
    */
   const unsigned int dsize = dimensions_.size();
-  unsigned int myCoords[dsize];
-  unsigned int targetCoords[dsize];
+  unsigned int* myCoords = new unsigned int[dsize];
+  unsigned int* targetCoords= new unsigned int[dsize];
   unsigned int dim_size_product = 1;
   for (unsigned i = 0; i < dsize; i++) {
     unsigned cur_dim_size = dimensions_[i];
@@ -187,6 +187,8 @@ void TorusZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs*
 
     current_node = next_node;
   }
+  delete[] myCoords;
+  delete[] targetCoords;
 }
 }
 }