Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
merge a collapsible if statement to please sonar
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 25 Sep 2016 23:17:59 +0000 (01:17 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 25 Sep 2016 23:17:59 +0000 (01:17 +0200)
src/simdag/sd_daxloader.cpp

index 58969ce..aeb28a4 100644 (file)
@@ -87,11 +87,9 @@ bool acyclic_graph_detail(xbt_dynar_t dag){
   if(!all_marked){
     XBT_VERB("there is at least one cycle in your task graph");
     xbt_dynar_foreach(dag,count,task){
   if(!all_marked){
     XBT_VERB("there is at least one cycle in your task graph");
     xbt_dynar_foreach(dag,count,task){
-      if(task->kind != SD_TASK_COMM_E2E) {
-        if(task->predecessors->empty() && task->inputs->empty()){
-          task->marked = 1;
-          current.push_back(task);
-        }
+      if(task->kind != SD_TASK_COMM_E2E && task->predecessors->empty() && task->inputs->empty()){
+       task->marked = 1;
+       current.push_back(task);
       }
     }
     //test if something has to be done for the next iteration
       }
     }
     //test if something has to be done for the next iteration