mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 05:32:54 +08:00
Merge pull request #4042 from Aergwyn/code-improvements
Remove unnecessary blank lines
This commit is contained in:
commit
dfc903fec2
@ -26,7 +26,6 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
for (int i = 0; i < 512; i++)
|
||||
beatmap.HitObjects.Add(new Fruit { X = 0.5f + i / 2048f * (i % 10 - 5), StartTime = i * 100, NewCombo = i % 8 == 0 });
|
||||
|
||||
|
@ -19,7 +19,6 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
var beatmap = new Beatmap { BeatmapInfo = { Ruleset = ruleset.RulesetInfo } };
|
||||
|
||||
|
||||
for (int i = 0; i < 512; i++)
|
||||
if (i % 5 < 3)
|
||||
beatmap.HitObjects.Add(new Fruit { X = i % 10 < 5 ? 0.02f : 0.98f, StartTime = i * 100, NewCombo = i % 8 == 0 });
|
||||
|
@ -14,7 +14,6 @@ namespace osu.Game.Rulesets.Catch.Difficulty
|
||||
{
|
||||
public class CatchDifficultyCalculator : DifficultyCalculator
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// In milliseconds. For difficulty calculation we will only look at the highest strain value in each time interval of size STRAIN_STEP.
|
||||
/// This is to eliminate higher influence of stream over aim by simply having more HitObjects with high strain.
|
||||
|
@ -180,7 +180,6 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
|
||||
|
||||
foreach (var obj in newPattern.HitObjects)
|
||||
yield return obj;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,6 @@ namespace osu.Game.Rulesets.Mania.Difficulty
|
||||
if (!calculateStrainValues(difficultyHitObjects, timeRate))
|
||||
return new DifficultyAttributes(mods, 0);
|
||||
|
||||
|
||||
double starRating = calculateDifficulty(difficultyHitObjects, timeRate) * star_scaling_factor;
|
||||
|
||||
return new ManiaDifficultyAttributes(mods, starRating)
|
||||
|
@ -21,7 +21,6 @@ namespace osu.Game.Rulesets.Mania.Objects
|
||||
|
||||
private readonly int beatmapColumnCount;
|
||||
|
||||
|
||||
private readonly double endTime;
|
||||
private readonly double[] heldUntil;
|
||||
|
||||
|
@ -101,7 +101,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
float aimRotation = MathHelper.RadiansToDegrees((float)Math.Atan2(aimRotationVector.Y - Position.Y, aimRotationVector.X - Position.X));
|
||||
while (Math.Abs(aimRotation - Rotation) > 180)
|
||||
aimRotation += aimRotation < Rotation ? 360 : -360;
|
||||
|
@ -149,7 +149,6 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
using (var stream = Resource.OpenResource(filename))
|
||||
using (var sr = new StreamReader(stream))
|
||||
{
|
||||
|
||||
var legacyDecoded = new LegacyBeatmapDecoder { ApplyOffsets = false }.Decode(sr);
|
||||
using (var ms = new MemoryStream())
|
||||
using (var sw = new StreamWriter(ms))
|
||||
|
@ -40,7 +40,6 @@ namespace osu.Game.Tests.Visual
|
||||
typeof(DrawableCarouselBeatmapSet),
|
||||
};
|
||||
|
||||
|
||||
private readonly Stack<BeatmapSetInfo> selectedSets = new Stack<BeatmapSetInfo>();
|
||||
private readonly HashSet<int> eagerSelectedIDs = new HashSet<int>();
|
||||
|
||||
|
@ -55,7 +55,6 @@ namespace osu.Game.Tests.Visual
|
||||
AddStep("resize to normal", () => container.ResizeWidthTo(0.8f, 300));
|
||||
AddStep("online scores", () => scoresContainer.Beatmap = new BeatmapInfo { OnlineBeatmapID = 75, Ruleset = new OsuRuleset().RulesetInfo });
|
||||
|
||||
|
||||
scores = new[]
|
||||
{
|
||||
new APIScoreInfo
|
||||
|
@ -16,7 +16,6 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
public TestCaseBreadcrumbs()
|
||||
{
|
||||
|
||||
Add(breadcrumbs = new BreadcrumbControl<BreadcrumbTab>
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
|
@ -39,7 +39,6 @@ namespace osu.Game.Tests.Visual
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
AddStep("Add random", () =>
|
||||
{
|
||||
Key key = (Key)((int)Key.A + RNG.Next(26));
|
||||
|
@ -57,5 +57,4 @@ namespace osu.Game.Tests.Visual
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ namespace osu.Game.Online.Chat
|
||||
/// </summary>
|
||||
private readonly List<LocalEchoMessage> pendingMessages = new List<LocalEchoMessage>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// An event that fires when new messages arrived.
|
||||
/// </summary>
|
||||
|
@ -77,7 +77,6 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
CloseButton.FadeIn(TRANSITION_LENGTH, Easing.OutQuint);
|
||||
}
|
||||
|
||||
|
||||
protected override void FadeInactive()
|
||||
{
|
||||
base.FadeInactive();
|
||||
|
@ -18,7 +18,6 @@ namespace osu.Game.Overlays.KeyBinding
|
||||
Add(new InGameKeyBindingsSubsection(manager));
|
||||
}
|
||||
|
||||
|
||||
private class DefaultBindingsSubsection : KeyBindingsSubsection
|
||||
{
|
||||
protected override string Header => string.Empty;
|
||||
|
@ -176,7 +176,6 @@ namespace osu.Game.Overlays.Mods
|
||||
section.DeselectTypes(modTypes, immediate);
|
||||
}
|
||||
|
||||
|
||||
private SampleChannel sampleOn, sampleOff;
|
||||
|
||||
private void modButtonPressed(Mod selectedMod)
|
||||
|
@ -49,7 +49,6 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
Api.Queue(request);
|
||||
}
|
||||
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
@ -124,7 +124,6 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
// osu-stable treated the first span of the slider as a repeat, but no repeats are happening
|
||||
repeatCount = Math.Max(0, repeatCount - 1);
|
||||
|
||||
|
||||
if (split.Length > 7)
|
||||
length = Convert.ToDouble(split[7], CultureInfo.InvariantCulture);
|
||||
|
||||
|
@ -17,7 +17,6 @@ namespace osu.Game.Screens.Edit.Components
|
||||
|
||||
public TimeInfoContainer()
|
||||
{
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
trackTimer = new OsuSpriteText
|
||||
|
@ -101,7 +101,6 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
private readonly Container<DrawableCarouselItem> scrollableContent;
|
||||
|
||||
|
||||
public Bindable<bool> RightClickScrollingEnabled = new Bindable<bool>();
|
||||
|
||||
public Bindable<RandomSelectAlgorithm> RandomAlgorithm = new Bindable<RandomSelectAlgorithm>();
|
||||
|
@ -78,6 +78,5 @@ namespace osu.Game.Users
|
||||
[JsonProperty(@"country")]
|
||||
public int? Country;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user