From 6c14ef01d4fdb3be269d022c4788cfd3582cfa5f Mon Sep 17 00:00:00 2001 From: ManlyMarco Date: Thu, 29 Aug 2019 17:53:25 +0200 Subject: [PATCH] Inline Version.IsZero --- BepInEx/Bootstrap/Chainloader.cs | 3 ++- BepInEx/Utility.cs | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/BepInEx/Bootstrap/Chainloader.cs b/BepInEx/Bootstrap/Chainloader.cs index 6fe9d79..f0bcbc0 100644 --- a/BepInEx/Bootstrap/Chainloader.cs +++ b/BepInEx/Bootstrap/Chainloader.cs @@ -272,7 +272,8 @@ namespace BepInEx.Bootstrap { string ToMissingString(BepInDependency s) { - if (s.MinimumVersion.IsZero()) return "- " + s.DependencyGUID; + bool emptyVersion = s.MinimumVersion.Major == 0 && s.MinimumVersion.Minor == 0 && s.MinimumVersion.Build == 0 && s.MinimumVersion.Revision == 0; + if (emptyVersion) return "- " + s.DependencyGUID; return $"- {s.DependencyGUID} (at least v{s.MinimumVersion})"; } diff --git a/BepInEx/Utility.cs b/BepInEx/Utility.cs index 0a3b8f7..b4f69f0 100644 --- a/BepInEx/Utility.cs +++ b/BepInEx/Utility.cs @@ -237,10 +237,5 @@ namespace BepInEx return false; } } - - internal static bool IsZero(this Version v) - { - return v.Major == 0 && v.Minor == 0 && v.Build == 0 && v.Revision == 0; - } } } \ No newline at end of file