mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 23:42:55 +08:00
Merge pull request #25301 from peppy/inspections-bash
Fix some new nullable inspections
This commit is contained in:
commit
46d1eca0c7
@ -49,13 +49,9 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
path.ControlPoints.Clear();
|
path.ControlPoints.Clear();
|
||||||
path.ExpectedDistance.Value = null;
|
path.ControlPoints.AddRange(value.ControlPoints.Select(c => new PathControlPoint(c.Position, c.Type)));
|
||||||
|
|
||||||
if (value != null)
|
path.ExpectedDistance.Value = value.ExpectedDistance.Value;
|
||||||
{
|
|
||||||
path.ControlPoints.AddRange(value.ControlPoints.Select(c => new PathControlPoint(c.Position, c.Type)));
|
|
||||||
path.ExpectedDistance.Value = value.ExpectedDistance.Value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -51,6 +52,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
|
|
||||||
private SelectionState state;
|
private SelectionState state;
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
public event Action<SelectionState> StateChanged;
|
public event Action<SelectionState> StateChanged;
|
||||||
|
|
||||||
public SelectionState State
|
public SelectionState State
|
||||||
|
@ -166,6 +166,8 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
|
|
||||||
public override void Add(Drawable drawable)
|
public override void Add(Drawable drawable)
|
||||||
{
|
{
|
||||||
|
ArgumentNullException.ThrowIfNull(drawable);
|
||||||
|
|
||||||
if (drawable is Background)
|
if (drawable is Background)
|
||||||
throw new InvalidOperationException($"Use {nameof(Background)} to set a background.");
|
throw new InvalidOperationException($"Use {nameof(Background)} to set a background.");
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -190,6 +191,7 @@ namespace osu.Game.Screens.Play
|
|||||||
private const float padding = 2;
|
private const float padding = 2;
|
||||||
public const float WIDTH = cube_size + padding;
|
public const float WIDTH = cube_size + padding;
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
public event Action<ColumnState> StateChanged;
|
public event Action<ColumnState> StateChanged;
|
||||||
|
|
||||||
private readonly List<Box> drawableRows = new List<Box>();
|
private readonly List<Box> drawableRows = new List<Box>();
|
||||||
|
Loading…
Reference in New Issue
Block a user