| ... | @@ -300,10 +300,8 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type | ... | @@ -300,10 +300,8 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type |
| 300 | } | 300 | } |
| 301 | | 301 | |
| 302 | pub fn set(it: &Iterator, index: usize) void { | 302 | pub fn set(it: &Iterator, index: usize) void { |
| 303 | if (index < prealloc_item_count) { | 303 | it.index = index; |
| 304 | it.index = index; | 304 | if (index < prealloc_item_count) return; |
| 305 | return; | | |
| 306 | } | | |
| 307 | it.shelf_index = shelfIndex(index); | 305 | it.shelf_index = shelfIndex(index); |
| 308 | it.box_index = boxIndex(index, it.shelf_index); | 306 | it.box_index = boxIndex(index, it.shelf_index); |
| 309 | it.shelf_size = shelfSize(it.shelf_index); | 307 | it.shelf_size = shelfSize(it.shelf_index); |