mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 07:07:45 +08:00
Apply some second-pass inspections that appeared after previous changes
This commit is contained in:
parent
6944151486
commit
95837990f3
@ -62,9 +62,7 @@ namespace osu.Game.Rulesets.Mania.MathUtils
|
||||
|
||||
if (i < j)
|
||||
{
|
||||
T key = keys[i];
|
||||
keys[i] = keys[j];
|
||||
keys[j] = key;
|
||||
(keys[i], keys[j]) = (keys[j], keys[i]);
|
||||
}
|
||||
|
||||
i++;
|
||||
@ -142,11 +140,7 @@ namespace osu.Game.Rulesets.Mania.MathUtils
|
||||
private static void swap(T[] a, int i, int j)
|
||||
{
|
||||
if (i != j)
|
||||
{
|
||||
T t = a[i];
|
||||
a[i] = a[j];
|
||||
a[j] = t;
|
||||
}
|
||||
(a[i], a[j]) = (a[j], a[i]);
|
||||
}
|
||||
|
||||
private static void swapIfGreater(T[] keys, IComparer<T> comparer, int a, int b)
|
||||
@ -154,11 +148,7 @@ namespace osu.Game.Rulesets.Mania.MathUtils
|
||||
if (a != b)
|
||||
{
|
||||
if (comparer.Compare(keys[a], keys[b]) > 0)
|
||||
{
|
||||
T key = keys[a];
|
||||
keys[a] = keys[b];
|
||||
keys[b] = key;
|
||||
}
|
||||
(keys[a], keys[b]) = (keys[b], keys[a]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
{
|
||||
base.SetUpSteps();
|
||||
|
||||
string[] expectedSampleNames = new[]
|
||||
string[] expectedSampleNames =
|
||||
{
|
||||
string.Empty,
|
||||
string.Empty,
|
||||
@ -31,6 +31,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
HitSampleInfo.HIT_WHISTLE,
|
||||
HitSampleInfo.HIT_WHISTLE,
|
||||
};
|
||||
|
||||
var actualSampleNames = new List<string>();
|
||||
|
||||
// due to pooling we can't access all samples right away due to object re-use,
|
||||
|
@ -289,7 +289,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
[Test]
|
||||
public void TestSpectatingDuringGameplay()
|
||||
{
|
||||
int[] players = new[] { PLAYER_1_ID, PLAYER_2_ID };
|
||||
int[] players = { PLAYER_1_ID, PLAYER_2_ID };
|
||||
|
||||
start(players);
|
||||
sendFrames(players, 300);
|
||||
|
@ -156,7 +156,7 @@ namespace osu.Game.Database
|
||||
|
||||
void convertOnlineIDs<T>() where T : RealmObject
|
||||
{
|
||||
string? className = typeof(T).Name.Replace(@"Realm", string.Empty);
|
||||
string className = typeof(T).Name.Replace(@"Realm", string.Empty);
|
||||
|
||||
// version was not bumped when the beatmap/ruleset models were added
|
||||
// therefore we must manually check for their presence to avoid throwing on the `DynamicApi` calls.
|
||||
|
@ -136,7 +136,7 @@ namespace osu.Game.Online.Chat
|
||||
// length > 3 since all these links need another argument to work
|
||||
if (args.Length > 3 && args[1].EndsWith(websiteRootUrl, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
string? mainArg = args[3];
|
||||
string mainArg = args[3];
|
||||
|
||||
switch (args[2])
|
||||
{
|
||||
|
@ -201,7 +201,7 @@ namespace osu.Game.Stores
|
||||
{
|
||||
try
|
||||
{
|
||||
string[]? files = Directory.GetFiles(RuntimeInfo.StartupDirectory, @$"{ruleset_library_prefix}.*.dll");
|
||||
string[] files = Directory.GetFiles(RuntimeInfo.StartupDirectory, @$"{ruleset_library_prefix}.*.dll");
|
||||
|
||||
foreach (string file in files.Where(f => !Path.GetFileName(f).Contains("Tests")))
|
||||
loadRulesetFromFile(file);
|
||||
|
Loading…
Reference in New Issue
Block a user