commit a55548c334572566dbf89c145f657909cae99366
parent cf8be8d72882a8164f7685ce206f6773d1af058f
Author: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Date: Sun, 20 Sep 2026 16:18:41 -0300
main: reach the tree through the fill that is filling it
run_live took a tree beside the fill that already pointed at it, so there were two
ways to name the same thing and nothing keeping them the same one. The parameter
was left over from moving the reader out of this file.
The two file-private markers in here become package-private as well, finishing the
sweep begun a couple of commits ago; that half was already in the working tree.
Diffstat:
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/live.odin b/live.odin
@@ -24,7 +24,7 @@ answer from the last one.
*/
FRAME :: 16 * time.Millisecond
-run_live :: proc(f: ^Fill, t: ^scan.Tree) -> int {
+run_live :: proc(f: ^Fill) -> int {
out: scan.Publisher
started := time.tick_now()
@@ -32,7 +32,7 @@ run_live :: proc(f: ^Fill, t: ^scan.Tree) -> int {
sync.atomic_store(&f.scanning, true)
b := Builder {
- tree = t,
+ tree = f.tree,
out = &out,
scanning = &f.scanning,
started = started,
@@ -77,7 +77,7 @@ run_live :: proc(f: ^Fill, t: ^scan.Tree) -> int {
last.nodes,
last.pending,
human(last.rows[0].bytes),
- scan.path(t, last.rows[0].node, context.temp_allocator),
+ scan.path(f.tree, last.rows[0].node, context.temp_allocator),
time.duration_milliseconds(time.tick_since(frame_start)),
last.complete ? " (final)" : "",
)
@@ -110,18 +110,18 @@ run_live :: proc(f: ^Fill, t: ^scan.Tree) -> int {
missed,
)
- print_largest(t, b.roll.totals[:], .files)
- print_largest(t, b.roll.totals[:], .directories)
+ print_largest(f.tree, b.roll.totals[:], .files)
+ print_largest(f.tree, b.roll.totals[:], .directories)
return 0
}
-@(private = "file")
+@(private)
fill_thread :: proc(f: ^Fill) {
fill_run(f)
}
-@(private = "file")
+@(private)
build_thread :: proc(b: ^Builder) {
builder_run(b)
}
diff --git a/main.odin b/main.odin
@@ -134,7 +134,7 @@ run :: proc() -> int {
defer fill_destroy(&f)
if opt.live {
- return run_live(&f, &t)
+ return run_live(&f)
}
start := time.tick_now()