#"cast discards const qualifier" error... even when it doesn't.
1 messages · Page 1 of 1 (latest)
partitions needs to be a *std.ArrayList([]u32)
function parameters are always const in zig
Thanks, If I do that, I get an error at the call site:
Even though the call is straightforward:
var partitions = std.ArrayList([]u32).init(allocator);
defer partitions.deinit(allocator);
try medianCut(allocator, &partitions, pixels, 2);
Yep!
is this pseudo code or exactly what it actually is?
Exactly what it is
does medianCut do recursion?
Yep!
are you passing the address of the arraylist inside medianCut? if so thats the problem
partitions is already a pointer inside the function
yes you were right
because i couldnt think of a single other thing lol