mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
Fix some issues rider did not raise
This commit is contained in:
@@ -46,7 +46,7 @@ namespace osu.Framework.Tests.Containers
|
||||
{
|
||||
var unused = new AudioContainer
|
||||
{
|
||||
Children = (IReadOnlyList<Drawable>)Activator.CreateInstance(containerType)
|
||||
Children = (IReadOnlyList<Drawable>)Activator.CreateInstance(containerType)!
|
||||
};
|
||||
});
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace osu.Framework.Tests.Containers
|
||||
{
|
||||
var unused = new AudioContainer();
|
||||
|
||||
unused.AddRange((IEnumerable<Drawable>)Activator.CreateInstance(containerType));
|
||||
unused.AddRange((IEnumerable<Drawable>)Activator.CreateInstance(containerType)!);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@@ -94,6 +95,8 @@ namespace osu.Framework.Tests.Visual.Graphics
|
||||
// No depth testing.
|
||||
renderer.PushDepthInfo(new DepthInfo(false));
|
||||
|
||||
Debug.Assert(Children != null);
|
||||
|
||||
drawStencil(renderer, Children[1]);
|
||||
drawBackground(renderer, Children[0]);
|
||||
|
||||
@@ -141,7 +144,7 @@ namespace osu.Framework.Tests.Visual.Graphics
|
||||
renderer.PopStencilInfo();
|
||||
}
|
||||
|
||||
public List<DrawNode> Children { get; set; } = new List<DrawNode>();
|
||||
public List<DrawNode>? Children { get; set; } = new List<DrawNode>();
|
||||
|
||||
public bool AddChildDrawNodes => true;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace osu.Framework.Graphics
|
||||
/// <summary>
|
||||
/// The child <see cref="DrawNode"/>s to draw.
|
||||
/// </summary>
|
||||
List<DrawNode> Children { get; set; }
|
||||
List<DrawNode>? Children { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether <see cref="Children"/> should be updated by the parenting <see cref="CompositeDrawable"/>.
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace osu.Framework.Graphics
|
||||
/// <summary>
|
||||
/// The parent of this drawable in the scene graph.
|
||||
/// </summary>
|
||||
CompositeDrawable Parent { get; }
|
||||
CompositeDrawable? Parent { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether this drawable is present for any sort of user-interaction.
|
||||
|
||||
Reference in New Issue
Block a user