xar: fix freelist_push_with_index using freelist_index_of which doesn't exist

This commit is contained in:
Laytan Laats
2026-02-25 19:01:30 +01:00
parent a7b2471a26
commit 8bb8344ad6

View File

@@ -29,7 +29,7 @@ freelist_clear :: proc(x: ^$X/Freelist_Array($T, $SHIFT)) {
freelist_push_with_index :: proc(x: ^$X/Freelist_Array($T, $SHIFT), value: T, loc := #caller_location) -> (ptr: ^T, index: int, err: runtime.Allocator_Error) {
if x.freelist != nil {
slot := x.freelist
idx := freelist_index_of(x, slot)
idx, _ := freelist_linear_search(x, slot)
x.freelist = (^^T)(slot)^
slot^ = value
return slot, idx, nil