mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08: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.Platform;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.IO.Archives;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
@ -162,7 +161,7 @@ namespace osu.Game.Tests.Scores.IO
|
||||
var scoreManager = osu.Dependencies.Get<ScoreManager>();
|
||||
await scoreManager.Import(score, archive);
|
||||
|
||||
return scoreManager.Query(_ => true).Detach();
|
||||
return scoreManager.Query(_ => true);
|
||||
}
|
||||
|
||||
internal class TestArchiveReader : ArchiveReader
|
||||
|
@ -95,7 +95,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
imported?.PerformRead(s =>
|
||||
{
|
||||
beatmapInfo = s.Beatmaps[0].Detach();
|
||||
beatmapInfo = s.Beatmaps[0];
|
||||
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
|
@ -188,7 +188,7 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
public int BeatmapVersion;
|
||||
|
||||
public BeatmapInfo Clone() => (BeatmapInfo)this.Detach().MemberwiseClone();
|
||||
public BeatmapInfo Clone() => (BeatmapInfo)MemberwiseClone();
|
||||
|
||||
public override string ToString() => this.GetDisplayTitle();
|
||||
|
||||
|
@ -84,7 +84,6 @@ namespace osu.Game.Beatmaps
|
||||
if (working != null)
|
||||
return working;
|
||||
|
||||
// TODO: FUCK THE WORLD :D
|
||||
beatmapInfo = beatmapInfo.Detach();
|
||||
|
||||
workingCache.Add(working = new BeatmapManagerWorkingBeatmap(beatmapInfo, this));
|
||||
|
@ -682,9 +682,7 @@ namespace osu.Game.Screens.Select
|
||||
if (beatmapSet.Beatmaps.All(b => b.Hidden))
|
||||
return null;
|
||||
|
||||
// TODO: FUCK THE WORLD :D
|
||||
if (beatmapSet.IsManaged)
|
||||
beatmapSet = beatmapSet.Detach();
|
||||
beatmapSet = beatmapSet.Detach();
|
||||
|
||||
var set = new CarouselBeatmapSet(beatmapSet)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user