From c5193671b07d11062ebe612c5278e8400aa39eb7 Mon Sep 17 00:00:00 2001 From: Emik Date: Mon, 1 Apr 2024 18:26:41 +0200 Subject: [PATCH] Apply lints --- wawa.IO/Source/Internals/TypePairEqualityComparer.cs | 7 +++++-- wawa.Modules/Source/Sounds/SoundCore.cs | 2 ++ wawa.Recall/Source/GlobalUsings.cs | 1 - 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wawa.IO/Source/Internals/TypePairEqualityComparer.cs b/wawa.IO/Source/Internals/TypePairEqualityComparer.cs index 54f7146..9e78d9c 100755 --- a/wawa.IO/Source/Internals/TypePairEqualityComparer.cs +++ b/wawa.IO/Source/Internals/TypePairEqualityComparer.cs @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 namespace Wawa.IO.Internals; /// Provides an for . @@ -7,7 +8,9 @@ sealed class TypePairEqualityComparer : IEqualityComparerGets the singleton instance. - internal static IEqualityComparer> Instance { get; } = new TypePairEqualityComparer(); + [NotNull] + internal static IEqualityComparer> Instance { [Pure] get; } = + new TypePairEqualityComparer(); /// [Pure] @@ -18,4 +21,4 @@ bool IEqualityComparer>.Equals(KeyValuePair x, Ke [Pure] int IEqualityComparer>.GetHashCode(KeyValuePair obj) => unchecked(EqualityComparer.Default.GetHashCode(obj.Key) * 397 ^ obj.Value.GetHashCode()); -} \ No newline at end of file +} diff --git a/wawa.Modules/Source/Sounds/SoundCore.cs b/wawa.Modules/Source/Sounds/SoundCore.cs index ea8e6e9..fa17213 100755 --- a/wawa.Modules/Source/Sounds/SoundCore.cs +++ b/wawa.Modules/Source/Sounds/SoundCore.cs @@ -29,7 +29,9 @@ public static Maybe Play( ? audio.HandlePlaySoundAtTransformWithRef?.Invoke(that.Modded.Value, transform, isLooping) : audio.HandlePlayGameSoundAtTransformWithRef?.Invoke(that.Vanilla.Unwrap(), transform); } +#pragma warning disable S1696 catch (NullReferenceException) +#pragma warning restore S1696 { return null; } diff --git a/wawa.Recall/Source/GlobalUsings.cs b/wawa.Recall/Source/GlobalUsings.cs index 6d60853..984fd9c 100755 --- a/wawa.Recall/Source/GlobalUsings.cs +++ b/wawa.Recall/Source/GlobalUsings.cs @@ -2,6 +2,5 @@ extern alias core; extern alias unity; global using static Wawa.Recall.Internals.Globals; -global using Color = unity::UnityEngine.Color; global using CoreBehaviour = core::UnityEngine.MonoBehaviour; global using MonoBehaviour = unity::UnityEngine.MonoBehaviour;