From 1b12f7aadaf0e0a4570a5985900f61d0fb897f79 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 00:22:27 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- test/pdf_pointer_bench.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/pdf_pointer_bench.zig') 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); -- cgit v1.3