mirror of https://github.com/ppy/osu
Make `RankFromScore()`'s dictionary param readonly
Just to make sure nobody tries any "funny" business.
This commit is contained in:
parent
5bae9074aa
commit
cb8ec48717
|
@ -89,7 +89,7 @@ protected override double GetComboScoreChange(JudgementResult result)
|
|||
return baseIncrease * Math.Min(Math.Max(0.5, Math.Log(result.ComboAfterJudgement, combo_base)), Math.Log(combo_cap, combo_base));
|
||||
}
|
||||
|
||||
public override ScoreRank RankFromScore(double accuracy, Dictionary<HitResult, int> results)
|
||||
public override ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||
{
|
||||
if (accuracy == accuracy_cutoff_x)
|
||||
return ScoreRank.X;
|
||||
|
|
|
@ -16,7 +16,7 @@ public OsuScoreProcessor()
|
|||
{
|
||||
}
|
||||
|
||||
public override ScoreRank RankFromScore(double accuracy, Dictionary<HitResult, int> results)
|
||||
public override ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||
{
|
||||
ScoreRank rank = base.RankFromScore(accuracy, results);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ protected override double GetComboScoreChange(JudgementResult result)
|
|||
* strongScaleValue(result);
|
||||
}
|
||||
|
||||
public override ScoreRank RankFromScore(double accuracy, Dictionary<HitResult, int> results)
|
||||
public override ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||
{
|
||||
ScoreRank rank = base.RankFromScore(accuracy, results);
|
||||
|
||||
|
|
|
@ -505,7 +505,7 @@ public void SetScoreProcessorStatistics(ScoreProcessorStatistics statistics)
|
|||
/// <summary>
|
||||
/// Given an accuracy (0..1), return the correct <see cref="ScoreRank"/>.
|
||||
/// </summary>
|
||||
public virtual ScoreRank RankFromScore(double accuracy, Dictionary<HitResult, int> results)
|
||||
public virtual ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||
{
|
||||
if (accuracy == accuracy_cutoff_x)
|
||||
return ScoreRank.X;
|
||||
|
|
Loading…
Reference in New Issue