1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 10:22:56 +08:00

Simplify foreach.

This commit is contained in:
smoogipooo 2017-03-14 12:38:30 +09:00
parent bc5912eab5
commit 6ebd88060a

View File

@ -102,12 +102,8 @@ namespace osu.Game.Modes.UI
if (mods == null)
return;
foreach (var mod in mods)
{
var applyable = mod as IApplicableMod<TObject>;
applyable?.Apply(this);
}
foreach (var mod in mods.OfType<IApplicableMod<TObject>>())
mod?.Apply(this);
}
private void onJudgement(DrawableHitObject<TObject> o, JudgementInfo j) => TriggerOnJudgement(j);