Use new ArgumentNullException.ThrowIfNull throw-helper API

This commit is contained in:
Berkan Diler
2022-12-22 21:27:59 +01:00
parent 867a1963be
commit 08d2fbeb8e
27 changed files with 36 additions and 54 deletions

View File

@ -36,8 +36,7 @@ namespace osu.Game.Graphics.Containers
/// <param name="easing">The easing type of the initial transform.</param>
public void StartTracking(OsuLogo logo, double duration = 0, Easing easing = Easing.None)
{
if (logo == null)
throw new ArgumentNullException(nameof(logo));
ArgumentNullException.ThrowIfNull(logo);
if (logo.IsTracking && Logo == null)
throw new InvalidOperationException($"Cannot track an instance of {typeof(OsuLogo)} to multiple {typeof(LogoTrackingContainer)}s");