Skip to content

Commit 026f837

Browse files
committed
depth had fencepost error
1 parent 8d77bd7 commit 026f837

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/sketch/sketch_columns.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ FixedSizeSketchColumn::~FixedSizeSketchColumn() {
6666
uint8_t FixedSizeSketchColumn::get_depth() const {
6767
for (size_t i = capacity; i > 0; --i) {
6868
if (!Bucket_Boruvka::is_empty(buckets[i - 1])) {
69-
return i - 1;
69+
return i;
7070
}
7171
}
7272
return 0;
@@ -228,7 +228,7 @@ uint8_t ResizeableSketchColumn::get_depth() const {
228228
// TODO - maybe rely on flag vectors
229229
for (size_t i = capacity; i > 0; --i) {
230230
if (!Bucket_Boruvka::is_empty(aligned_buckets[i - 1])) {
231-
return i - 1;
231+
return i;
232232
}
233233
}
234234
return 0;

0 commit comments

Comments
 (0)