Replace F extension with string interpolation

This commit is contained in:
teinarss
2021-04-24 17:46:24 +02:00
committed by reaperrr
parent 1385aca783
commit 10676be377
300 changed files with 752 additions and 799 deletions

View File

@@ -92,7 +92,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var totalMinutes = currentSong.Length / 60;
var totalSeconds = currentSong.Length % 60;
return "{0:D2}:{1:D2} / {2:D2}:{3:D2}".F(minutes, seconds, totalMinutes, totalSeconds);
return $"{minutes:D2}:{seconds:D2} / {totalMinutes:D2}:{totalSeconds:D2}";
};
var musicTitle = panel.GetOrNull<LabelWidget>("TITLE_LABEL");
@@ -157,7 +157,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
static string SongLengthLabel(MusicInfo song)
{
return "{0:D1}:{1:D2}".F(song.Length / 60, song.Length % 60);
return $"{song.Length / 60:D1}:{song.Length % 60:D2}";
}
}
}