mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
simplify array initializationstatement
This commit is contained in:
parent
ac202ba7ea
commit
a440d15620
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user