remove unused PositiveSlice Preallocate

This commit is contained in:
Arthur Lu 2024-11-12 19:04:02 +00:00
parent ce635cc2b1
commit f1407fd045
2 changed files with 0 additions and 14 deletions

View File

@ -41,15 +41,3 @@ func (a *PositiveSlice[T]) Set(idx int, value T) {
a.data[actualIdx] = value
a.valid[actualIdx] = true
}
func (a *PositiveSlice[T]) Preallocate(hi int) {
size := hi
// expand data array to actualIdx
newData := make([]T, size+1)
a.data = newData
// expand valid array to actualIdx
newValid := make([]bool, size+1)
a.valid = newValid
}

View File

@ -130,8 +130,6 @@ func NewWavefrontComponent() *WavefrontComponent {
},
}
//w.W.Preallocate(preallocateSize)
return w
}