mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 13:58:27 +00:00
fix std.SegmentedList.Iterator.set
This commit is contained in:
parent
b48d354600
commit
942d384831
@ -300,10 +300,8 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type
|
||||
}
|
||||
|
||||
pub fn set(it: &Iterator, index: usize) void {
|
||||
if (index < prealloc_item_count) {
|
||||
it.index = index;
|
||||
return;
|
||||
}
|
||||
it.index = index;
|
||||
if (index < prealloc_item_count) return;
|
||||
it.shelf_index = shelfIndex(index);
|
||||
it.box_index = boxIndex(index, it.shelf_index);
|
||||
it.shelf_size = shelfSize(it.shelf_index);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user