From 7900a84bd68d7c9450bba719ce925b61043875f3 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 26 Jul 2020 02:50:20 -0400 Subject: use ordinal comparison/sorting instead of invariant --- src/SMAPI.Toolkit/Framework/ModData/ModDataModel.cs | 2 +- src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/SMAPI.Toolkit/Framework/ModData') diff --git a/src/SMAPI.Toolkit/Framework/ModData/ModDataModel.cs b/src/SMAPI.Toolkit/Framework/ModData/ModDataModel.cs index 8b40c301..2167d3e5 100644 --- a/src/SMAPI.Toolkit/Framework/ModData/ModDataModel.cs +++ b/src/SMAPI.Toolkit/Framework/ModData/ModDataModel.cs @@ -68,7 +68,7 @@ namespace StardewModdingAPI.Toolkit.Framework.ModData foreach (string part in parts.Take(parts.Length - 1)) { // 'default' - if (part.Equals("Default", StringComparison.InvariantCultureIgnoreCase)) + if (part.Equals("Default", StringComparison.OrdinalIgnoreCase)) { isDefault = true; continue; diff --git a/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs b/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs index c892d820..3201c421 100644 --- a/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs +++ b/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs @@ -46,13 +46,13 @@ namespace StardewModdingAPI.Toolkit.Framework.ModData public bool HasID(string id) { // try main ID - if (this.ID.Equals(id, StringComparison.InvariantCultureIgnoreCase)) + if (this.ID.Equals(id, StringComparison.OrdinalIgnoreCase)) return true; // try former IDs foreach (string formerID in this.FormerIDs) { - if (formerID.Equals(id, StringComparison.InvariantCultureIgnoreCase)) + if (formerID.Equals(id, StringComparison.OrdinalIgnoreCase)) return true; } -- cgit