mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 08:39:11 +00:00
Improve hashcode in Sectorcoordinates.
This commit is contained in:
@@ -46,11 +46,9 @@ public final class SectorCoordinates {
|
||||
if (obj == null || getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final SectorCoordinates other = (SectorCoordinates) obj;
|
||||
if (x != other.x || y != other.y) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return x == other.x && y == other.y;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -73,7 +71,7 @@ public final class SectorCoordinates {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 61 * (427 + x) + y;
|
||||
return x << 16 | y;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user