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

@ -133,7 +133,7 @@ namespace Server.Engines.Reports
if (ladder == null)
return chart;
List<LadderEntry> entries = ladder.Entries;
for (int i = entries.Count - 1; i >= 0; --i)
@ -205,7 +205,7 @@ namespace Server.Engines.Reports
if (prefs == null)
return chart;
List<Arena> arenas = Arena.Arenas;
for (int i = 0; i < arenas.Count; ++i)
@ -528,7 +528,7 @@ namespace Server.Engines.Reports
return report;
}
public class SkillDistribution : IComparable
public class SkillDistribution : IComparable<SkillDistribution>
{
public int m_NumberOfGMs;
public SkillInfo m_Skill;
@ -538,10 +538,10 @@ namespace Server.Engines.Reports
m_Skill = skill;
}
public int CompareTo(object obj)
public int CompareTo(SkillDistribution sd)
{
return ((SkillDistribution)obj).m_NumberOfGMs - m_NumberOfGMs;
return sd?.m_NumberOfGMs ?? 0 - m_NumberOfGMs;
}
}
}
}
}