Fixed type of temporary slice in sort_by_indices_overwrite
This commit is contained in:
1 parent
7d3dfb1046
commit
873b7f8588
1 file changed
+1
-1
@@ -62,7 +62,7 @@ _sort_by_indices :: proc(data, sorted: $T/[]$E, indices: []int) {
|
||||
|
||||
sort_by_indices_overwrite :: proc(data: $T/[]$E, indices: []int) {
|
||||
assert(len(data) == len(indices))
|
||||
temp := make([]int, len(data), context.allocator)
|
||||
temp := make([]E, len(data), context.allocator)
|
||||
defer delete(temp)
|
||||
for v, i in indices {
|
||||
temp[i] = data[v]
|
||||
|
||||
Reference in new issue
Block a user