Skip to content

Commit d988cc5

Browse files
fix: address InspectCode CI errors, warnings, and notes (second batch)
Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/2e17044b-3164-4e7a-92ca-38cb1bb9eece Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
1 parent c852893 commit d988cc5

32 files changed

Lines changed: 35 additions & 43 deletions

osu.Game.Tests/Beatmaps/Formats/LegacyBeatmapDecoderTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,9 +824,9 @@ public void TestDecodeFileWithContentImmediatelyAfterHeader()
824824
[Test]
825825
public void TestDecodeEmptyFile()
826826
{
827-
using var resStream = new MemoryStream();
828827
Assert.Throws<IOException>(() =>
829828
{
829+
using var resStream = new MemoryStream();
830830
using var stream = new LineBufferedReader(resStream);
831831
Decoder.GetDecoder<Beatmap>(stream);
832832
});

osu.Game/Screens/Edit/Components/FormSampleSet.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,8 @@ private void updateState()
274274

275275
recycleSamples();
276276

277-
if (triangles == null)
278-
return;
279-
280-
triangles.Colour = ColourInfo.GradientVertical(triangleGradientSecondColour ?? default, BackgroundColour);
277+
if (triangles != null)
278+
triangles.Colour = ColourInfo.GradientVertical(triangleGradientSecondColour ?? default, BackgroundColour);
281279
}
282280

283281
private void recycleSamples() => Schedule(() =>

osu.Game/Screens/OnlinePlay/Matchmaking/Queue/RatingDistributionGraph.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,9 +725,9 @@ public void SetContent(RatingDistributionGraphTooltipData content)
725725
valueText.Text = content.Value;
726726
}
727727

728-
public void Move(System.Numerics.Vector2 pos)
728+
public void Move(Vector2 pos)
729729
{
730-
pos = Parent!.ToLocalSpace(content.Position) - new System.Numerics.Vector2(DrawWidth + 10, 0);
730+
pos = Parent!.ToLocalSpace(content.Position) - new Vector2(DrawWidth + 10, 0);
731731

732732
if (instantMove)
733733
{

osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Components/RankedPlayStageDisplay.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ private void load()
197197
};
198198
}
199199

200-
201200
protected override void LoadComplete()
202201
{
203202
base.LoadComplete();

osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/GameplayWarmupScreen.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
using osu.Framework.Graphics.Containers;
1212
using osu.Framework.Graphics.Shapes;
1313
using osu.Framework.Localisation;
14-
1514
using osu.Game.Beatmaps;
1615
using osu.Game.Database;
1716
using osu.Game.Graphics.Containers;

osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Hand/PlayerHandOfCards.PlayerHandCard.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private void updatePlayButtonVisibility()
9999
PlayButton.Alpha = PlayButton.Action != null && Selected ? 1 : 0;
100100
}
101101

102-
public override bool ReceivePositionalInputAt(System.Numerics.Vector2 screenSpacePos)
102+
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos)
103103
{
104104
if (PlayButton.Alpha > 0)
105105
return fullInputArea.ReceivePositionalInputAt(screenSpacePos);

osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/OpponentPickScreen.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ private void cardPlayed(RankedPlayCardWithPlaylistItem item) => Task.Run(async (
153153

154154
Schedule(() =>
155155
{
156-
157156
if (opponentHand.RemoveCard(item, out var card, out var drawQuad))
158157
{
159158
card.MatchScreenSpaceDrawQuad(drawQuad, CenterRow);

osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/PickScreen.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ private void onPlayButtonClicked()
270270

271271
private void cardPlayed(RankedPlayCardWithPlaylistItem item)
272272
{
273-
274273
if (playerHand.RemoveCard(item, out var card, out var drawQuad))
275274
{
276275
card.MatchScreenSpaceDrawQuad(drawQuad, CenterRow);

osu.Game/Screens/Play/GameplayMenuOverlay.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public abstract partial class GameplayMenuOverlay : OverlayContainer, IKeyBindin
3939

4040
protected override bool BlockScrollInput => false;
4141

42-
public override bool ReceivePositionalInputAt(System.Numerics.Vector2 screenSpacePos) => true;
42+
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
4343

4444
public Action? OnResume { get; init; }
4545
public Action? OnRetry { get; init; }

osu.Game/Screens/Play/HUD/ArgonSongProgressBar.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace osu.Game.Screens.Play.HUD
1919
public partial class ArgonSongProgressBar : SongProgressBar, IHasTooltip
2020
{
2121
// Parent will handle restricting the area of valid input.
22-
public override bool ReceivePositionalInputAt(System.Numerics.Vector2 screenSpacePos) => true;
22+
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
2323

2424
private readonly float barHeight;
2525

@@ -139,6 +139,7 @@ protected override void Update()
139139
audioBar.Length = (float)Interpolation.Lerp(audioBar.Length, AudioProgress, Math.Clamp(Time.Elapsed / 40, 0, 1));
140140

141141
bool shouldBeBehind = trackTime > AudioTime;
142+
142143
if (shouldBeBehind != audioBarBehindPlayfieldBar)
143144
{
144145
audioBarBehindPlayfieldBar = shouldBeBehind;

0 commit comments

Comments
 (0)