From f1407fd0456a7d1f353d623d8b5c8dfdfea30af1 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Tue, 12 Nov 2024 19:04:02 +0000 Subject: [PATCH] remove unused PositiveSlice Preallocate --- pkg/custom_slice.go | 12 ------------ pkg/types.go | 2 -- 2 files changed, 14 deletions(-) diff --git a/pkg/custom_slice.go b/pkg/custom_slice.go index 5720372..c0b1530 100644 --- a/pkg/custom_slice.go +++ b/pkg/custom_slice.go @@ -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 -} diff --git a/pkg/types.go b/pkg/types.go index 5cd0ad0..d9e51a8 100644 --- a/pkg/types.go +++ b/pkg/types.go @@ -130,8 +130,6 @@ func NewWavefrontComponent() *WavefrontComponent { }, } - //w.W.Preallocate(preallocateSize) - return w }