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

@ -42,8 +42,8 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
{
IsForCurrentRuleset = beatmap.BeatmapInfo.Ruleset.Equals(ruleset.RulesetInfo);
var roundedCircleSize = Math.Round(beatmap.Difficulty.CircleSize);
var roundedOverallDifficulty = Math.Round(beatmap.Difficulty.OverallDifficulty);
double roundedCircleSize = Math.Round(beatmap.Difficulty.CircleSize);
double roundedOverallDifficulty = Math.Round(beatmap.Difficulty.OverallDifficulty);
if (IsForCurrentRuleset)
{
@ -73,7 +73,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
public static int GetColumnCountForNonConvert(BeatmapInfo beatmapInfo)
{
var roundedCircleSize = Math.Round(beatmapInfo.BaseDifficulty.CircleSize);
double roundedCircleSize = Math.Round(beatmapInfo.BaseDifficulty.CircleSize);
return (int)Math.Max(1, roundedCircleSize);
}

View File

@ -493,7 +493,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
if (!(HitObject is IHasPathWithRepeats curveData))
return null;
var index = SegmentDuration == 0 ? 0 : (time - StartTime) / SegmentDuration;
int index = SegmentDuration == 0 ? 0 : (time - StartTime) / SegmentDuration;
// avoid slicing the list & creating copies, if at all possible.
return index == 0 ? curveData.NodeSamples : curveData.NodeSamples.Skip(index).ToList();

View File

@ -302,7 +302,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
var pattern = new Pattern();
int noteCount = getRandomNoteCountMirrored(centreProbability, p2, p3, out var addToCentre);
int noteCount = getRandomNoteCountMirrored(centreProbability, p2, p3, out bool addToCentre);
int columnLimit = (TotalColumns % 2 == 0 ? TotalColumns : TotalColumns - 1) / 2;
int nextColumn = GetRandomColumn(upperBound: columnLimit);