mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-09 14:20:48 +00:00
range over numEmptyBlocks
This commit is contained in:
parent
abf7abf3ea
commit
62665d4d10
@ -123,7 +123,7 @@ func (d *disk) write() {
|
|||||||
|
|
||||||
allBlocks = append(allBlocks, d.fileblocks...)
|
allBlocks = append(allBlocks, d.fileblocks...)
|
||||||
|
|
||||||
for i := 0; i < numEmptyBlocks; i++ {
|
for i := range numEmptyBlocks {
|
||||||
for !d.emptyblocks[i].IsEmpty() {
|
for !d.emptyblocks[i].IsEmpty() {
|
||||||
allBlocks = append(allBlocks, heap.Pop(&d.emptyblocks[i]).(*block))
|
allBlocks = append(allBlocks, heap.Pop(&d.emptyblocks[i]).(*block))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user