1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-19 14:00:22 +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
Unverified
parent dbd76c1193
commit ff562e2dd7
+2 -6
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;
}
}
}