Apply batch fixing of built-in types using var

This commit is contained in:
Dean Herbert
2021-10-27 13:04:41 +09:00
parent 1d7e97625a
commit 6944151486
263 changed files with 572 additions and 572 deletions

View File

@ -57,9 +57,9 @@ namespace osu.Game.Screens.Select.Carousel
if (match)
{
var terms = BeatmapInfo.GetSearchableTerms();
string[] terms = BeatmapInfo.GetSearchableTerms();
foreach (var criteriaTerm in criteria.SearchTerms)
foreach (string criteriaTerm in criteria.SearchTerms)
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.
@ -89,7 +89,7 @@ namespace osu.Game.Screens.Select.Carousel
{
default:
case SortMode.Difficulty:
var ruleset = BeatmapInfo.RulesetID.CompareTo(otherBeatmap.BeatmapInfo.RulesetID);
int ruleset = BeatmapInfo.RulesetID.CompareTo(otherBeatmap.BeatmapInfo.RulesetID);
if (ruleset != 0) return ruleset;
return BeatmapInfo.StarDifficulty.CompareTo(otherBeatmap.BeatmapInfo.StarDifficulty);

View File

@ -95,8 +95,8 @@ namespace osu.Game.Screens.Select.Carousel
private int compareUsingAggregateMax(CarouselBeatmapSet other, Func<BeatmapInfo, double> func)
{
var ourBeatmaps = ValidBeatmaps.Any();
var otherBeatmaps = other.ValidBeatmaps.Any();
bool ourBeatmaps = ValidBeatmaps.Any();
bool otherBeatmaps = other.ValidBeatmaps.Any();
if (!ourBeatmaps && !otherBeatmaps) return 0;
if (!ourBeatmaps) return -1;

View File

@ -241,7 +241,7 @@ namespace osu.Game.Screens.Select.Carousel
TernaryState state;
var countExisting = beatmapSet.Beatmaps.Count(b => collection.Beatmaps.Contains(b));
int countExisting = beatmapSet.Beatmaps.Count(b => collection.Beatmaps.Contains(b));
if (countExisting == beatmapSet.Beatmaps.Count)
state = TernaryState.True;