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

@ -11,7 +11,7 @@ using Server.Network;
namespace Server.Accounting
{
public class Account : IAccount, IComparable, IComparable<Account>
public class Account : IAccount, IComparable<Account>
{
public static readonly TimeSpan YoungDuration = TimeSpan.FromHours( 40.0 );
@ -1121,28 +1121,14 @@ namespace Server.Accounting
}
public int CompareTo( Account other )
{
if ( other == null )
return 1;
return Username.CompareTo( other.Username );
}
{
return other == null ? 1 : Username.CompareTo( other.Username );
}
public int CompareTo( IAccount other )
{
if ( other == null )
return 1;
return Username.CompareTo( other.Username );
}
public int CompareTo( object obj )
{
if ( obj is Account account )
return CompareTo( account );
throw new ArgumentException();
}
{
return other == null ? 1 : Username.CompareTo( other.Username );
}
#region Gold Account
/// <summary>