1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 16:32:54 +08:00

Remove unnecessary null check

This commit is contained in:
Dean Herbert 2017-12-26 15:33:02 +09:00
parent e14ad31a07
commit 024d9a6850

View File

@ -59,21 +59,18 @@ namespace osu.Game.Tests.Visual
{ {
TestSongSelect songSelect = null; TestSongSelect songSelect = null;
if (manager == null) var storage = new TestStorage(@"TestCasePlaySongSelect");
// this is by no means clean. should be replacing inside of OsuGameBase somehow.
var context = new OsuDbContext();
Func<OsuDbContext> contextFactory = () => context;
dependencies.Cache(rulesets = new RulesetStore(contextFactory));
dependencies.Cache(manager = new BeatmapManager(storage, contextFactory, rulesets, null)
{ {
var storage = new TestStorage(@"TestCasePlaySongSelect"); DefaultBeatmap = defaultBeatmap = baseManager.GetWorkingBeatmap(null)
});
// this is by no means clean. should be replacing inside of OsuGameBase somehow.
var context = new OsuDbContext();
Func<OsuDbContext> contextFactory = () => context;
dependencies.Cache(rulesets = new RulesetStore(contextFactory));
dependencies.Cache(manager = new BeatmapManager(storage, contextFactory, rulesets, null)
{
DefaultBeatmap = defaultBeatmap = baseManager.GetWorkingBeatmap(null)
});
}
void loadNewSongSelect(bool deleteMaps = false) => AddStep("reload song select", () => void loadNewSongSelect(bool deleteMaps = false) => AddStep("reload song select", () =>
{ {