aboutsummaryrefslogtreecommitdiff
path: root/core/container
diff options
context:
space:
mode:
authorflysand7 <yyakut.ac@gmail.com>2023-11-11 20:36:38 +1100
committerflysand7 <yyakut.ac@gmail.com>2023-11-11 20:36:38 +1100
commit270348b112d0becce7726023b72784066d02306d (patch)
tree8fc136e37ac82164e06c4072433b5df37edeae64 /core/container
parent59675949da61078c67faaaf127c54e89ff37fb52 (diff)
[core]: Remove `do` keyword from the core library
Diffstat (limited to 'core/container')
-rw-r--r--core/container/topological_sort/topological_sort.odin12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/container/topological_sort/topological_sort.odin b/core/container/topological_sort/topological_sort.odin
index 314e3e070..f1e9bf57b 100644
--- a/core/container/topological_sort/topological_sort.odin
+++ b/core/container/topological_sort/topological_sort.odin
@@ -80,11 +80,13 @@ sort :: proc(sorter: ^$S/Sorter($K)) -> (sorted, cycled: [dynamic]K) {
}
}
- for root in sorted do for k, _ in relations[root].dependents {
- relation := &relations[k]
- relation.dependencies -= 1
- if relation.dependencies == 0 {
- append(&sorted, k)
+ for root in sorted {
+ for k, _ in relations[root].dependents {
+ relation := &relations[k]
+ relation.dependencies -= 1
+ if relation.dependencies == 0 {
+ append(&sorted, k)
+ }
}
}