diff --git a/src/scheduler/Scheduler.cpp b/src/scheduler/Scheduler.cpp index 9ad0ac4f8207fff76bfdf2a4c76399cd6dd10c43..1fba2de64c6ed0e33357f78802c5ae25b125eeff 100644 --- a/src/scheduler/Scheduler.cpp +++ b/src/scheduler/Scheduler.cpp @@ -316,7 +316,7 @@ void Aidge::SequentialScheduler::generateEarlyLateScheduling(std::vector<StaticS } // Node can be run the earliest just after its latest parent was run - for (const auto parent : node->getParents()) { + for (const auto& parent : node->getParents()) { // Find parent node latest scheduled position const auto it = std::find_if(schedule.rend() - elt, schedule.rend(), [parent](const auto& v) { return (v.node == parent); }); @@ -343,7 +343,7 @@ void Aidge::SequentialScheduler::generateEarlyLateScheduling(std::vector<StaticS } // Node can be run the latest just before its earliest child is run - for (const auto child : node->getChildren()) { + for (const auto& child : node->getChildren()) { // Find child node earliest scheduled position const auto it = std::find_if(schedule.begin() + elt + 1, schedule.end(), [child](const auto& v) { return (v.node == child); });