A game framework written with osu! in mind.

Replace string.IndexOf calls with string.Contains

+2 -2
+1 -1
osu.Framework/Graphics/Containers/SearchContainer.cs
··· 69 69 //Words matched by parent is not needed to match children 70 70 var childTerms = terms.Where(term => 71 71 !filterable.FilterTerms.Any(filterTerm => 72 - filterTerm.IndexOf(term, StringComparison.InvariantCultureIgnoreCase) >= 0)).ToArray(); 72 + filterTerm.Contains(term, StringComparison.InvariantCultureIgnoreCase))).ToArray(); 73 73 74 74 bool matching = childTerms.Length == 0; 75 75
+1 -1
osu.Framework/IO/Stores/IResourceStore.cs
··· 78 78 /// <param name="source">A list of filenames.</param> 79 79 /// <returns>A list of filenames excluding common system files.</returns> 80 80 public static IEnumerable<string> ExcludeSystemFileNames(this IEnumerable<string> source) => 81 - source.Where(entry => !system_filename_ignore_list.Any(ignoredName => entry.IndexOf(ignoredName, StringComparison.OrdinalIgnoreCase) >= 0)); 81 + source.Where(entry => !system_filename_ignore_list.Any(ignoredName => entry.Contains(ignoredName, StringComparison.OrdinalIgnoreCase))); 82 82 } 83 83 }