Remove unnecessary null casts

This commit is contained in:
Dean Herbert
2022-06-24 14:48:43 +09:00
parent f4173a3bff
commit f71f6302fd
23 changed files with 30 additions and 33 deletions

View File

@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
@ -47,7 +46,7 @@ namespace osu.Game.Graphics.UserInterface
protected override void LoadComplete()
{
Active.BindDisabledChanged(disabled => Action = disabled ? (Action?)null : Active.Toggle, true);
Active.BindDisabledChanged(disabled => Action = disabled ? null : Active.Toggle, true);
Active.BindValueChanged(_ =>
{
updateActiveState();