mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 23:12:56 +08:00
Merge pull request #15461 from peppy/fix-more-computationally-expensive
Fix a few more "maybe null" inspections
This commit is contained in:
commit
c820d445ad
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
@ -67,9 +68,11 @@ namespace osu.Game.Tests.Online
|
|||||||
var deserialised = JsonConvert.DeserializeObject<APIMod>(JsonConvert.SerializeObject(apiMod));
|
var deserialised = JsonConvert.DeserializeObject<APIMod>(JsonConvert.SerializeObject(apiMod));
|
||||||
var converted = (TestModTimeRamp)deserialised?.ToMod(new TestRuleset());
|
var converted = (TestModTimeRamp)deserialised?.ToMod(new TestRuleset());
|
||||||
|
|
||||||
Assert.That(converted?.AdjustPitch.Value, Is.EqualTo(false));
|
Assert.That(converted, Is.Not.Null);
|
||||||
Assert.That(converted?.InitialRate.Value, Is.EqualTo(1.25));
|
|
||||||
Assert.That(converted?.FinalRate.Value, Is.EqualTo(0.25));
|
Assert.That(converted.AdjustPitch.Value, Is.EqualTo(false));
|
||||||
|
Assert.That(converted.InitialRate.Value, Is.EqualTo(1.25));
|
||||||
|
Assert.That(converted.FinalRate.Value, Is.EqualTo(0.25));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -121,11 +124,11 @@ namespace osu.Game.Tests.Online
|
|||||||
new TestModDifficultyAdjust()
|
new TestModDifficultyAdjust()
|
||||||
};
|
};
|
||||||
|
|
||||||
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => throw new System.NotImplementedException();
|
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => throw new NotImplementedException();
|
||||||
|
|
||||||
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => throw new System.NotImplementedException();
|
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => throw new NotImplementedException();
|
||||||
|
|
||||||
public override DifficultyCalculator CreateDifficultyCalculator(WorkingBeatmap beatmap) => throw new System.NotImplementedException();
|
public override DifficultyCalculator CreateDifficultyCalculator(WorkingBeatmap beatmap) => throw new NotImplementedException();
|
||||||
|
|
||||||
public override string Description { get; } = string.Empty;
|
public override string Description { get; } = string.Empty;
|
||||||
public override string ShortName { get; } = string.Empty;
|
public override string ShortName { get; } = string.Empty;
|
||||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Screens.Select
|
|||||||
new PopupDialogOkButton
|
new PopupDialogOkButton
|
||||||
{
|
{
|
||||||
Text = @"Yes. Totally. Delete it.",
|
Text = @"Yes. Totally. Delete it.",
|
||||||
Action = () => manager.Delete(beatmap),
|
Action = () => manager?.Delete(beatmap),
|
||||||
},
|
},
|
||||||
new PopupDialogCancelButton
|
new PopupDialogCancelButton
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user