aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/toposort.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/toposort.h')
-rw-r--r--kernel/toposort.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/toposort.h b/kernel/toposort.h
index 7e978c1e2..4226e270e 100644
--- a/kernel/toposort.h
+++ b/kernel/toposort.h
@@ -46,7 +46,7 @@ struct TopoSort
database[right].insert(left);
}
- void sort_worker(T n, std::set<T> &marked_cells, std::set<T> &active_cells, std::vector<T> active_stack)
+ void sort_worker(const T &n, std::set<T> &marked_cells, std::set<T> &active_cells, std::vector<T> &active_stack)
{
if (active_cells.count(n)) {
found_loops = false;
@@ -96,6 +96,7 @@ struct TopoSort
for (auto &it : database)
sort_worker(it.first, marked_cells, active_cells, active_stack);
+ log_assert(SIZE(sorted) == SIZE(database));
return !found_loops;
}
};