3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-17 00:20:09 +01:00
Dieser Commit ist enthalten in:
SirYwell 2023-01-26 10:14:47 +01:00
Ursprung 8436e73ab1
Commit 43d7e8124e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden

Datei anzeigen

@ -23,8 +23,7 @@ final class MemoryFileSupport {
static long requiredBytes(int bitsPerEntry, long entries) { static long requiredBytes(int bitsPerEntry, long entries) {
long bitsNeeded = bitsPerEntry * entries; long bitsNeeded = bitsPerEntry * entries;
// Math.ceilDiv is Java 18+ return MathMan.ceilDiv(bitsNeeded, 8) + MemoryFileSupport.PADDING;
return -Math.floorDiv(-bitsNeeded, 8) + MemoryFileSupport.PADDING;
} }
static int bitsPerEntry(int valueCount) { static int bitsPerEntry(int valueCount) {
@ -38,4 +37,5 @@ final class MemoryFileSupport {
static @Range(from = 0, to = 7) int shift(long bitPos, long bytePos) { static @Range(from = 0, to = 7) int shift(long bitPos, long bytePos) {
return (int) (bitPos - (bytePos << 3)); return (int) (bitPos - (bytePos << 3));
} }
} }