Replace usage of deprecated EWAHCompressedBitmap.add(long)

The add(long) method was deprecated in favor of addWord(long) in
the 0.8.3 release of JavaEWAH [1].

[1] https://github.com/lemire/javaewah/commit/e443cf5e

Change-Id: I89c397ed02e040f57663d04504399dfdc0889626
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
David Pursehouse 2016-12-08 11:10:35 +09:00
parent c7d8fbfaad
commit 654ae82970
2 changed files with 3 additions and 3 deletions

View File

@ -96,7 +96,7 @@ final EWAHCompressedBitmap toEWAHCompressedBitmap() {
} }
if (lastNonEmptyWord != 0) if (lastNonEmptyWord != 0)
compressed.add(lastNonEmptyWord); compressed.addWord(lastNonEmptyWord);
if (runningEmptyWords > 0) { if (runningEmptyWords > 0) {
compressed.addStreamOfEmptyWords(false, runningEmptyWords); compressed.addStreamOfEmptyWords(false, runningEmptyWords);
@ -107,7 +107,7 @@ final EWAHCompressedBitmap toEWAHCompressedBitmap() {
} }
int bitsThatMatter = 64 - Long.numberOfLeadingZeros(lastNonEmptyWord); int bitsThatMatter = 64 - Long.numberOfLeadingZeros(lastNonEmptyWord);
if (bitsThatMatter > 0) if (bitsThatMatter > 0)
compressed.add(lastNonEmptyWord, bitsThatMatter); compressed.addWord(lastNonEmptyWord, bitsThatMatter);
return compressed; return compressed;
} }

View File

@ -507,7 +507,7 @@ static final EWAHCompressedBitmap ones(int sizeInBits) {
true, sizeInBits / EWAHCompressedBitmap.WORD_IN_BITS); true, sizeInBits / EWAHCompressedBitmap.WORD_IN_BITS);
int remaining = sizeInBits % EWAHCompressedBitmap.WORD_IN_BITS; int remaining = sizeInBits % EWAHCompressedBitmap.WORD_IN_BITS;
if (remaining > 0) if (remaining > 0)
mask.add((1L << remaining) - 1, remaining); mask.addWord((1L << remaining) - 1, remaining);
return mask; return mask;
} }
} }