mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 16:37:38 +01:00
Inline array initialization
Signed-off-by: TheMode <themode@outlook.fr>
(cherry picked from commit 9b15acf4fa
)
This commit is contained in:
parent
96cd23fa7c
commit
315a97d677
@ -59,18 +59,14 @@ final class Serializers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static int[] uuidToIntArray(UUID uuid) {
|
private static int[] uuidToIntArray(UUID uuid) {
|
||||||
int[] array = new int[4];
|
|
||||||
|
|
||||||
final long uuidMost = uuid.getMostSignificantBits();
|
final long uuidMost = uuid.getMostSignificantBits();
|
||||||
final long uuidLeast = uuid.getLeastSignificantBits();
|
final long uuidLeast = uuid.getLeastSignificantBits();
|
||||||
|
return new int[]{
|
||||||
array[0] = (int) (uuidMost >> 32);
|
(int) (uuidMost >> 32),
|
||||||
array[1] = (int) uuidMost;
|
(int) uuidMost,
|
||||||
|
(int) (uuidLeast >> 32),
|
||||||
array[2] = (int) (uuidLeast >> 32);
|
(int) uuidLeast
|
||||||
array[3] = (int) uuidLeast;
|
};
|
||||||
|
|
||||||
return array;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static UUID intArrayToUuid(int[] array) {
|
private static UUID intArrayToUuid(int[] array) {
|
||||||
|
Loading…
Reference in New Issue
Block a user