mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Resolve CA2249 inspections
"Use `string.Contains` instead of `string.IndexOf` to improve readability"
This commit is contained in:
@ -59,7 +59,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
var terms = Beatmap.SearchableTerms;
|
||||
|
||||
foreach (var criteriaTerm in criteria.SearchTerms)
|
||||
match &= terms.Any(term => term.IndexOf(criteriaTerm, StringComparison.InvariantCultureIgnoreCase) >= 0);
|
||||
match &= terms.Any(term => term.Contains(criteriaTerm, StringComparison.InvariantCultureIgnoreCase));
|
||||
|
||||
// if a match wasn't found via text matching of terms, do a second catch-all check matching against online IDs.
|
||||
// this should be done after text matching so we can prioritise matching numbers in metadata.
|
||||
|
Reference in New Issue
Block a user