From 88dce820d52f7e09ce5424e13b34d6c10d5868ed Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 4 Nov 2019 16:50:00 -0500 Subject: no longer omit zero patch numbers when formatting versions --- src/SMAPI.Toolkit/SemanticVersion.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/SMAPI.Toolkit') diff --git a/src/SMAPI.Toolkit/SemanticVersion.cs b/src/SMAPI.Toolkit/SemanticVersion.cs index 6d5d65ac..2ce3578e 100644 --- a/src/SMAPI.Toolkit/SemanticVersion.cs +++ b/src/SMAPI.Toolkit/SemanticVersion.cs @@ -172,16 +172,10 @@ namespace StardewModdingAPI.Toolkit /// Get a string representation of the version. public override string ToString() { - // version - string result = this.PatchVersion != 0 - ? $"{this.MajorVersion}.{this.MinorVersion}.{this.PatchVersion}" - : $"{this.MajorVersion}.{this.MinorVersion}"; - - // tag - string tag = this.PrereleaseTag; - if (tag != null) - result += $"-{tag}"; - return result; + string version = $"{this.MajorVersion}.{this.MinorVersion}.{this.PatchVersion}"; + if (this.PrereleaseTag != null) + version += $"-{this.PrereleaseTag}"; + return version; } /// Parse a version string without throwing an exception if it fails. -- cgit