summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-07-27 16:19:24 +0200
committerClifford Wolf <clifford@clifford.at>2014-07-27 16:43:39 +0200
commit5da343b7de8c4fd45695af68aaba3d5091d8e670 (patch)
treef5a722324665c4fefed4777b37c054d403ba43f1 /kernel
parent0c86d6106c3ff4cd7628b1206281eb6080f8bf51 (diff)
Added topological sorting to techmap
Diffstat (limited to 'kernel')
-rw-r--r--kernel/toposort.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/toposort.h b/kernel/toposort.h
index 7e978c1e..4226e270 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;
}
};