From 1ba1e99953044cd2c9d1a088ae02977aafeae0e6 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Sat, 17 Aug 2019 17:31:47 -0500 Subject: [PATCH] Simplified AlmostVersion null check --- IPA.Loader/Utilities/AlmostVersion.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IPA.Loader/Utilities/AlmostVersion.cs b/IPA.Loader/Utilities/AlmostVersion.cs index c9e81279..49a066ac 100644 --- a/IPA.Loader/Utilities/AlmostVersion.cs +++ b/IPA.Loader/Utilities/AlmostVersion.cs @@ -206,8 +206,8 @@ namespace IPA.Utilities /// public static bool operator==(AlmostVersion l, AlmostVersion r) { - if (ReferenceEquals(l, null) && ReferenceEquals(r, null)) return true; - if (ReferenceEquals(l, null) || ReferenceEquals(r, null)) return false; + if (l is null && r is null) return true; + if (l is null || r is null) return false; if (l.StorageMode != r.StorageMode) return false; if (l.StorageMode == StoredAs.SemVer) return Utils.VersionCompareNoPrerelease(l.SemverValue, r.SemverValue) == 0;