mirror of
https://github.com/ppy/osu
synced 2024-12-26 17:02:59 +00:00
Sanitise and remove some usages of Detach
which are no longer required
This commit is contained in:
parent
5f7365e8f3
commit
34aa1bf21d
@ -10,7 +10,6 @@ using NUnit.Framework;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Database;
|
|
||||||
using osu.Game.IO.Archives;
|
using osu.Game.IO.Archives;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
@ -162,7 +161,7 @@ namespace osu.Game.Tests.Scores.IO
|
|||||||
var scoreManager = osu.Dependencies.Get<ScoreManager>();
|
var scoreManager = osu.Dependencies.Get<ScoreManager>();
|
||||||
await scoreManager.Import(score, archive);
|
await scoreManager.Import(score, archive);
|
||||||
|
|
||||||
return scoreManager.Query(_ => true).Detach();
|
return scoreManager.Query(_ => true);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class TestArchiveReader : ArchiveReader
|
internal class TestArchiveReader : ArchiveReader
|
||||||
|
@ -95,7 +95,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
imported?.PerformRead(s =>
|
imported?.PerformRead(s =>
|
||||||
{
|
{
|
||||||
beatmapInfo = s.Beatmaps[0].Detach();
|
beatmapInfo = s.Beatmaps[0];
|
||||||
|
|
||||||
for (int i = 0; i < 50; i++)
|
for (int i = 0; i < 50; i++)
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
public int BeatmapVersion;
|
public int BeatmapVersion;
|
||||||
|
|
||||||
public BeatmapInfo Clone() => (BeatmapInfo)this.Detach().MemberwiseClone();
|
public BeatmapInfo Clone() => (BeatmapInfo)MemberwiseClone();
|
||||||
|
|
||||||
public override string ToString() => this.GetDisplayTitle();
|
public override string ToString() => this.GetDisplayTitle();
|
||||||
|
|
||||||
|
@ -84,7 +84,6 @@ namespace osu.Game.Beatmaps
|
|||||||
if (working != null)
|
if (working != null)
|
||||||
return working;
|
return working;
|
||||||
|
|
||||||
// TODO: FUCK THE WORLD :D
|
|
||||||
beatmapInfo = beatmapInfo.Detach();
|
beatmapInfo = beatmapInfo.Detach();
|
||||||
|
|
||||||
workingCache.Add(working = new BeatmapManagerWorkingBeatmap(beatmapInfo, this));
|
workingCache.Add(working = new BeatmapManagerWorkingBeatmap(beatmapInfo, this));
|
||||||
|
@ -682,9 +682,7 @@ namespace osu.Game.Screens.Select
|
|||||||
if (beatmapSet.Beatmaps.All(b => b.Hidden))
|
if (beatmapSet.Beatmaps.All(b => b.Hidden))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
// TODO: FUCK THE WORLD :D
|
beatmapSet = beatmapSet.Detach();
|
||||||
if (beatmapSet.IsManaged)
|
|
||||||
beatmapSet = beatmapSet.Detach();
|
|
||||||
|
|
||||||
var set = new CarouselBeatmapSet(beatmapSet)
|
var set = new CarouselBeatmapSet(beatmapSet)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user