1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 13:03:21 +08:00

simplify array initializationstatement

This commit is contained in:
Liam DeVoe 2020-03-20 16:58:02 -04:00
parent ac202ba7ea
commit a440d15620
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Catch.Mods
string overallDifficulty = OverallDifficulty.IsDefault ? "" : $"OD {OverallDifficulty.Value}";
string approachRate = ApproachRate.IsDefault ? "" : $"AR {ApproachRate.Value}";
string[] settings = new string[] { circleSize, drainRate, overallDifficulty, approachRate };
string[] settings = { circleSize, drainRate, overallDifficulty, approachRate };
// filter out empty strings so we don't have orphaned commas
settings = Array.FindAll(settings, s => !string.IsNullOrEmpty(s));
return string.Join(", ", settings);

View File

@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Osu.Mods
string overallDifficulty = OverallDifficulty.IsDefault ? "" : $"OD {OverallDifficulty.Value}";
string approachRate = ApproachRate.IsDefault ? "" : $"AR {ApproachRate.Value}";
string[] settings = new string[] { circleSize, drainRate, overallDifficulty, approachRate };
string[] settings = { circleSize, drainRate, overallDifficulty, approachRate };
// filter out empty strings so we don't have orphaned commas
settings = Array.FindAll(settings, s => !string.IsNullOrEmpty(s));
return string.Join(", ", settings);