Skip to content

Commit

Permalink
fix(stream): fix binary search
Browse files Browse the repository at this point in the history
Signed-off-by: SSpirits <admin@lv5.moe>
  • Loading branch information
ShadowySpirits committed Dec 25, 2023
1 parent de3cad3 commit f653b0d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public int search(T target) {
int low = 0;
int high = size() - 1;
while (low <= high) {
int mid = low + (high - low) >>> 1;
int mid = low + ((high - low) >>> 1);
ComparableItem<T> midVal = get(mid);
if (midVal.isLessThan(target)) {
low = mid + 1;
Expand Down

0 comments on commit f653b0d

Please sign in to comment.