- //test if something has to be done for the next iteration
- while(!xbt_dynar_is_empty(current)){
- next = xbt_dynar_new(sizeof(SD_task_t),nullptr);
- //test if the current iteration is done
- xbt_dynar_foreach(current,count_current,task){
- if (task == nullptr)
- continue;
- //push task in next
- task->marked = 1;
- for (SD_task_t it : *task->inputs){
- it->marked = 1;
+ while(!current.empty()){
+ std::vector<SD_task_t> next;
+ for (auto t: current){
+ //Mark task
+ t->marked = 1;
+ for (SD_task_t input : *t->inputs){
+ input->marked=1;