diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-07-26 02:50:20 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-07-26 02:50:20 -0400 |
commit | 7900a84bd68d7c9450bba719ce925b61043875f3 (patch) | |
tree | 8c495b7fe1c29c0cb552dc657a7a8b61185be0bd /src/SMAPI/Framework/Content | |
parent | ee4c88f6016b6bc0d72e0d459f6b918bdd7728f3 (diff) | |
download | SMAPI-7900a84bd68d7c9450bba719ce925b61043875f3.tar.gz SMAPI-7900a84bd68d7c9450bba719ce925b61043875f3.tar.bz2 SMAPI-7900a84bd68d7c9450bba719ce925b61043875f3.zip |
use ordinal comparison/sorting instead of invariant
Diffstat (limited to 'src/SMAPI/Framework/Content')
-rw-r--r-- | src/SMAPI/Framework/Content/AssetDataForMap.cs | 2 | ||||
-rw-r--r-- | src/SMAPI/Framework/Content/AssetInfo.cs | 2 | ||||
-rw-r--r-- | src/SMAPI/Framework/Content/ContentCache.cs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/Content/AssetDataForMap.cs b/src/SMAPI/Framework/Content/AssetDataForMap.cs index f66013ba..dee5b034 100644 --- a/src/SMAPI/Framework/Content/AssetDataForMap.cs +++ b/src/SMAPI/Framework/Content/AssetDataForMap.cs @@ -67,7 +67,7 @@ namespace StardewModdingAPI.Framework.Content { // change ID if needed so new tilesheets are added after vanilla ones (to avoid errors in hardcoded game logic) string id = sourceSheet.Id; - if (!id.StartsWith("z_", StringComparison.InvariantCultureIgnoreCase)) + if (!id.StartsWith("z_", StringComparison.OrdinalIgnoreCase)) id = $"z_{id}"; // change ID if it conflicts with an existing tilesheet diff --git a/src/SMAPI/Framework/Content/AssetInfo.cs b/src/SMAPI/Framework/Content/AssetInfo.cs index 9b685e72..ed009499 100644 --- a/src/SMAPI/Framework/Content/AssetInfo.cs +++ b/src/SMAPI/Framework/Content/AssetInfo.cs @@ -47,7 +47,7 @@ namespace StardewModdingAPI.Framework.Content public bool AssetNameEquals(string path) { path = this.GetNormalizedPath(path); - return this.AssetName.Equals(path, StringComparison.InvariantCultureIgnoreCase); + return this.AssetName.Equals(path, StringComparison.OrdinalIgnoreCase); } diff --git a/src/SMAPI/Framework/Content/ContentCache.cs b/src/SMAPI/Framework/Content/ContentCache.cs index b0933ac6..2052f6bf 100644 --- a/src/SMAPI/Framework/Content/ContentCache.cs +++ b/src/SMAPI/Framework/Content/ContentCache.cs @@ -89,7 +89,7 @@ namespace StardewModdingAPI.Framework.Content public string NormalizeKey(string key) { key = this.NormalizePathSeparators(key); - return key.EndsWith(".xnb", StringComparison.InvariantCultureIgnoreCase) + return key.EndsWith(".xnb", StringComparison.OrdinalIgnoreCase) ? key.Substring(0, key.Length - 4) : this.NormalizeAssetNameForPlatform(key); } |