diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 00:22:27 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 01:00:59 -0300 |
| commit | 1b12f7aadaf0e0a4570a5985900f61d0fb897f79 (patch) | |
| tree | 2563f00aa47d3ef39ef1647482ba5d19bc1373a1 /test/pdf_pointer_bench.zig | |
| parent | b283824eed0703ae9b89f2af520354046146b855 (diff) | |
| download | pardes-1b12f7aadaf0e0a4570a5985900f61d0fb897f79.tar.gz pardes-1b12f7aadaf0e0a4570a5985900f61d0fb897f79.zip | |
surface: a frame's images are a std.ArrayList(ImagePlace), where they were a slice of optionals grown by hand (appendImagePlace's doubling realloc, nimages beside it) whose slots were never null: every reader's `orelse continue` and `.?` go (gui, tui, terminal, TerminalImages, ninep/screen, test/pdf.zig, kitty and the two PDF benches); macos.zig's loop the same, passing ast-check but not built here
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/pdf_pointer_bench.zig')
| -rw-r--r-- | test/pdf_pointer_bench.zig | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/pdf_pointer_bench.zig b/test/pdf_pointer_bench.zig index ae2de2f5..a6560263 100644 --- a/test/pdf_pointer_bench.zig +++ b/test/pdf_pointer_bench.zig @@ -111,8 +111,7 @@ const Run = struct { } fn observe(run: *Run, surface: *const pardes.Surface) void { - for (surface.images[0..surface.nimages]) |maybe| { - const place = maybe orelse continue; + for (surface.images.items) |place| { run.visual = mix(run.visual, [_]u64{ place.pane, place.x, place.y, place.w, place.h, place.native.page, place.iw, place.ih }); if (place.native.geometry) |g| run.visual = mix(run.visual, [_]u64{ g.src.x, g.src.y, g.src.w, g.src.h, g.dst.x, g.dst.y, g.dst.w, g.dst.h }); run.visual = std.hash.Wyhash.hash(run.visual, place.rgba); |
