mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Switch casing comparison mode to ordinal
Switch from InvariantCultureIgnoreCase to OrdinalIgnoreCase when checking file paths in archives for substrings indicating the file can be ignored for performance gains. Co-Authored-By: Dan Balasescu <smoogipoo@smgi.me>
This commit is contained in:
parent
c7eb0b401b
commit
4b84564f47
@ -58,7 +58,7 @@ namespace osu.Game.IO.Archives
|
|||||||
archiveStream.Dispose();
|
archiveStream.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool canBeIgnored(IEntry entry) => filename_ignore_list.Any(ignoredName => entry.Key.IndexOf(ignoredName, StringComparison.InvariantCultureIgnoreCase) >= 0);
|
private static bool canBeIgnored(IEntry entry) => filename_ignore_list.Any(ignoredName => entry.Key.IndexOf(ignoredName, StringComparison.OrdinalIgnoreCase) >= 0);
|
||||||
|
|
||||||
public override IEnumerable<string> Filenames => archive.Entries.Where(e => !canBeIgnored(e)).Select(e => e.Key).ToArray();
|
public override IEnumerable<string> Filenames => archive.Entries.Where(e => !canBeIgnored(e)).Select(e => e.Key).ToArray();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user