Eliminate unnecessary loop

This commit is contained in:
Bartłomiej Dach
2020-08-18 15:24:30 +02:00
parent cd2280b5bf
commit 9fb494d5d3

View File

@ -80,6 +80,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
/// </summary> /// </summary>
private double repetitionPenalties() private double repetitionPenalties()
{ {
const int l = 2;
double penalty = 1.0; double penalty = 1.0;
monoHistory.Add(currentMonoLength); monoHistory.Add(currentMonoLength);
@ -87,8 +88,6 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
if (monoHistory.Count > mono_history_max_length) if (monoHistory.Count > mono_history_max_length)
monoHistory.RemoveAt(0); monoHistory.RemoveAt(0);
for (int l = 2; l <= mono_history_max_length / 2; l++)
{
for (int start = monoHistory.Count - l - 1; start >= 0; start--) for (int start = monoHistory.Count - l - 1; start >= 0; start--)
{ {
bool samePattern = true; bool samePattern = true;
@ -109,7 +108,6 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
break; break;
} }
} }
}
return penalty; return penalty;
} }