parent
1705259934
commit
0dc2b96f20
1 changed files with 4 additions and 13 deletions
|
@ -1,28 +1,19 @@
|
|||
From c5c6774c86524fbd298556d556af855679b25223 Mon Sep 17 00:00:00 2001
|
||||
From 0ed4d284bbdfffc523e2c2c731443a31df66de15 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Fri, 21 Jun 2013 17:13:47 +1000
|
||||
Subject: [PATCH] LongHash Tweaks
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/LongHash.java b/src/main/java/org/bukkit/craftbukkit/util/LongHash.java
|
||||
index 691cafd..fd0b6f9 100644
|
||||
index 691cafd..9d54472 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/LongHash.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/LongHash.java
|
||||
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.util;
|
||||
|
||||
public class LongHash {
|
||||
public static long toLong(int msw, int lsw) {
|
||||
- return ((long) msw << 32) + lsw - Integer.MIN_VALUE;
|
||||
+ return ((long) msw << 32) | (lsw & 0xFFFFFFFF); // Spigot
|
||||
}
|
||||
|
||||
public static int msw(long l) {
|
||||
@@ -10,6 +10,6 @@ public class LongHash {
|
||||
}
|
||||
|
||||
public static int lsw(long l) {
|
||||
- return (int) (l & 0xFFFFFFFF) + Integer.MIN_VALUE;
|
||||
+ return (int) (l & 0xFFFFFFFF);
|
||||
+ return (int) (l) + Integer.MIN_VALUE; // Spigot - remove redundant &
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/LongHashSet.java b/src/main/java/org/bukkit/craftbukkit/util/LongHashSet.java
|
||||
|
@ -229,5 +220,5 @@ index 0000000..9416f6e
|
|||
+ }
|
||||
+}
|
||||
--
|
||||
1.9.1
|
||||
1.8.3.2
|
||||
|
||||
|
|
Loading…
Reference in a new issue