1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 21:27:24 +08:00

Remove redundant guard

In this particular case guarding with `.IsNull()` makes no sense, as the
`Trigger` is supplied in constructor and cannot feasibly be null. Doing
that only makes sense in scenarios where BDL / dependency injection is
involved.
This commit is contained in:
Bartłomiej Dach 2023-06-26 19:12:49 +02:00
parent dbd76c1193
commit ff562e2dd7
No known key found for this signature in database

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Screens.Play.HUD
@ -49,11 +48,8 @@ namespace osu.Game.Screens.Play.HUD
{
base.Dispose(isDisposing);
if (Trigger.IsNotNull())
{
Trigger.OnActivate -= Activate;
Trigger.OnDeactivate -= Deactivate;
}
Trigger.OnActivate -= Activate;
Trigger.OnDeactivate -= Deactivate;
}
}
}