Removes old comparable/comparers. (#31)

This commit is contained in:
Kamron Batman 2019-03-11 15:35:04 -07:00 committed by GitHub
parent 513e54f70e
commit a45094f2dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 95 additions and 249 deletions

View file

@ -161,10 +161,10 @@ namespace Server
return Compare(l, r) < 0;
}
// public override int GetHashCode()
// {
// return Major ^ Minor ^ Revision ^ Patch ^ (int)Type;
// }
public override int GetHashCode()
{
return Major ^ Minor ^ Revision ^ Patch ^ (int)Type;
}
int IComparer<ClientVersion>.Compare(ClientVersion x, ClientVersion y)
{
@ -173,15 +173,9 @@ namespace Server
public override bool Equals(object obj)
{
if (obj == null)
return false;
ClientVersion v = obj as ClientVersion;
if (v == null)
return false;
return Major == v.Major
return Major == v?.Major
&& Minor == v.Minor
&& Revision == v.Revision
&& Patch == v.Patch