mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 08:52:56 +08:00
Prevent multiple enumeration
This commit is contained in:
parent
9955e02898
commit
12f52316cd
@ -47,7 +47,7 @@ namespace osu.Game.Utils
|
|||||||
/// <returns>Whether all <see cref="Mod"/>s in the combination are compatible with each-other.</returns>
|
/// <returns>Whether all <see cref="Mod"/>s in the combination are compatible with each-other.</returns>
|
||||||
public static bool CheckCompatibleSet(IEnumerable<Mod> combination, out List<Mod>? invalidMods)
|
public static bool CheckCompatibleSet(IEnumerable<Mod> combination, out List<Mod>? invalidMods)
|
||||||
{
|
{
|
||||||
combination = FlattenMods(combination);
|
combination = FlattenMods(combination).ToArray();
|
||||||
invalidMods = null;
|
invalidMods = null;
|
||||||
|
|
||||||
foreach (var mod in combination)
|
foreach (var mod in combination)
|
||||||
|
Loading…
Reference in New Issue
Block a user