Skip to content

Commit 36cdeb7

Browse files
committed
more wip
1 parent d2e207e commit 36cdeb7

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

roaringbitmap/src/main/java/org/roaringbitmap/art/Art.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public <T> long findOrCreateByKey(long highPart, ToLongFunction<Supplier<T>> nex
283283
byte branchKey = parentBranch.prefix[matchLength];
284284
parentBranch = parentBranch.shrinkPrefixBy(matchLength + 1);
285285
result = new LeafNode(highPart, nextContainer.applyAsLong(ifNotFound));
286-
parent = Node4.create(parentBranch, result, branchKey, LongUtils.getByte(highPart, depth + matchLength), highPart, depth, (byte) depth + matchLength);
286+
parent = Node4.create(parentBranch, result, branchKey, LongUtils.getByte(highPart, depth + matchLength), highPart, depth, matchLength);
287287
break;
288288
}
289289
}

roaringbitmap/src/main/java/org/roaringbitmap/longlong/HighLowContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void put(byte[] highPart, Container container) {
7474
}
7575

7676
public ContainerWithIndex findOrCreateContainer(long highPart, Supplier<Container> ifNotFound) {
77-
long containerIdx = art.findOrCreateByKey(highPart, containers::addContainer, ifNotFound);
77+
long containerIdx = art.findOrCreateByKey(highPart, x -> containers.addContainer(x.get()), ifNotFound);
7878
Container container = containers.getContainer(containerIdx);
7979
return new ContainerWithIndex(container, containerIdx);
8080
}

roaringbitmap/src/main/java/org/roaringbitmap/longlong/Roaring64Bitmap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void addLong(long x) {
7070
public void addLongNew(long x) {
7171
long high = LongUtils.highPartOnly(x);
7272
char low = LongUtils.lowPart(x);
73-
ContainerWithIndex containerWithIndex = highLowContainer.searchOrCreateContainer(high, ArrayContainer::new);
73+
ContainerWithIndex containerWithIndex = highLowContainer.findOrCreateContainer(high, ArrayContainer::new);
7474
Container container = containerWithIndex.getContainer();
7575
Container freshOne = container.add(low);
7676
highLowContainer.replaceContainer(containerWithIndex.getContainerIdx(), freshOne);

0 commit comments

Comments
 (0)