mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
Merge pull request #770 from xiangchw/v5-dev
bugfix: implicit conversion loses integer precision.
This commit is contained in:
commit
5fdc8ed494
@ -33,7 +33,7 @@ public class LongMap implements BitMap, Serializable {
|
|||||||
public void add(long i) {
|
public void add(long i) {
|
||||||
int r = (int) (i / BitMap.MACHINE64);
|
int r = (int) (i / BitMap.MACHINE64);
|
||||||
long c = i % BitMap.MACHINE64;
|
long c = i % BitMap.MACHINE64;
|
||||||
longs[r] = longs[r] | (1 << c);
|
longs[r] = longs[r] | (1L << c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -47,7 +47,7 @@ public class LongMap implements BitMap, Serializable {
|
|||||||
public void remove(long i) {
|
public void remove(long i) {
|
||||||
int r = (int) (i / BitMap.MACHINE64);
|
int r = (int) (i / BitMap.MACHINE64);
|
||||||
long c = i % BitMap.MACHINE64;
|
long c = i % BitMap.MACHINE64;
|
||||||
longs[r] &= ~(1 << c);
|
longs[r] &= ~(1L << c);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user