Skip to content

Commit

Permalink
Merge pull request #5282 from andy840119/remove-nullable-disable-in-t…
Browse files Browse the repository at this point in the history
…he-utils

Remove nullable disable annotation in the utils namespace
  • Loading branch information
peppy authored Jul 2, 2022
2 parents dbabe81 + 33b0a79 commit 2964692
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 25 deletions.
2 changes: 0 additions & 2 deletions osu.Framework/Utils/Blur.cs
Original file line number Diff line number Diff line change
@@ -1,8 +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.

#nullable disable

using System;

namespace osu.Framework.Utils
Expand Down
2 changes: 0 additions & 2 deletions osu.Framework/Utils/ConvexPolygonClipper.cs
Original file line number Diff line number Diff line change
@@ -1,8 +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.

#nullable disable

using System;
using System.Runtime.CompilerServices;
using osu.Framework.Graphics;
Expand Down
2 changes: 0 additions & 2 deletions osu.Framework/Utils/HasOrderedElementsAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,8 +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.

#nullable disable

using System;
using osu.Framework.Extensions.EnumExtensions;

Expand Down
2 changes: 0 additions & 2 deletions osu.Framework/Utils/IInterpolable.cs
Original file line number Diff line number Diff line change
@@ -1,8 +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.

#nullable disable

using osu.Framework.Graphics.Transforms;

namespace osu.Framework.Utils
Expand Down
8 changes: 3 additions & 5 deletions osu.Framework/Utils/Interpolation.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// 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.

#nullable disable

using System;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
Expand Down Expand Up @@ -384,9 +381,10 @@ static GenericInterpolation()

var parameters = typeof(InterpolationFunc<TValue, TEasing>)
.GetMethod(nameof(InterpolationFunc<TValue, TEasing>.Invoke))
?.GetParameters().Select(p => p.ParameterType).ToArray();
?.GetParameters().Select(p => p.ParameterType).ToArray()
?? Array.Empty<Type>();

MethodInfo valueAtMethod = typeof(GenericInterpolation<TEasing>).GetMethod(interpolation_method, parameters);
var valueAtMethod = typeof(GenericInterpolation<TEasing>).GetMethod(interpolation_method, parameters);

if (valueAtMethod != null)
FUNCTION = (InterpolationFunc<TValue, TEasing>)valueAtMethod.CreateDelegate(typeof(InterpolationFunc<TValue, TEasing>));
Expand Down
2 changes: 0 additions & 2 deletions osu.Framework/Utils/MathUtils.cs
Original file line number Diff line number Diff line change
@@ -1,8 +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.

#nullable disable

using System;

namespace osu.Framework.Utils
Expand Down
2 changes: 0 additions & 2 deletions osu.Framework/Utils/NumberFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,8 +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.

#nullable disable

using System;

namespace osu.Framework.Utils
Expand Down
2 changes: 0 additions & 2 deletions osu.Framework/Utils/OrderAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,8 +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.

#nullable disable

using System;
using osu.Framework.Extensions.EnumExtensions;

Expand Down
2 changes: 0 additions & 2 deletions osu.Framework/Utils/PathApproximator.cs
Original file line number Diff line number Diff line change
@@ -1,8 +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.

#nullable disable

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
2 changes: 0 additions & 2 deletions osu.Framework/Utils/Precision.cs
Original file line number Diff line number Diff line change
@@ -1,8 +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.

#nullable disable

using osuTK;
using System;
using osu.Framework.Graphics.Primitives;
Expand Down
2 changes: 0 additions & 2 deletions osu.Framework/Utils/RNG.cs
Original file line number Diff line number Diff line change
@@ -1,8 +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.

#nullable disable

using System;

namespace osu.Framework.Utils
Expand Down

0 comments on commit 2964692

Please sign in to comment.