summaryrefslogtreecommitdiff
path: root/src/SMAPI.Toolkit
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Toolkit')
-rw-r--r--src/SMAPI.Toolkit/SemanticVersion.cs14
1 files changed, 4 insertions, 10 deletions
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
/// <summary>Get a string representation of the version.</summary>
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;
}
/// <summary>Parse a version string without throwing an exception if it fails.</summary>