aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/corpus/fenwik.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/corpus/fenwik.go')
-rw-r--r--pkg/corpus/fenwik.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/corpus/fenwik.go b/pkg/corpus/fenwik.go
index 3a49219ac..dd6bfdbef 100644
--- a/pkg/corpus/fenwik.go
+++ b/pkg/corpus/fenwik.go
@@ -43,6 +43,11 @@ func (t *fenwikTree) prefixSumTo(ind int) (sum int64) {
return
}
+func (t *fenwikTree) reserve(cap int) {
+ t.capacity = cap
+ t.extendAndRebuild()
+}
+
func (t *fenwikTree) extendAndRebuild() {
if t.capacity == 0 {
t.capacity = 16