1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

Resolve CA1834 inspection

"Use `StringBuilder.Append(char)` instead of
`StringBuilder.Append(string)` when the input is a constant unit string"
This commit is contained in:
Bartłomiej Dach 2020-11-01 18:49:11 +01:00
parent 2b0bea535e
commit ca5de22ca5

View File

@ -417,7 +417,7 @@ namespace osu.Game.Beatmaps.Formats
string sampleFilename = samples.FirstOrDefault(s => string.IsNullOrEmpty(s.Name))?.LookupNames.First() ?? string.Empty;
int volume = samples.FirstOrDefault()?.Volume ?? 100;
sb.Append(":");
sb.Append(':');
sb.Append(FormattableString.Invariant($"{customSampleBank}:"));
sb.Append(FormattableString.Invariant($"{volume}:"));
sb.Append(FormattableString.Invariant($"{sampleFilename}"));