mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 23:12:56 +08:00
Ensure detached when performing model Clone
operations on BeatmapInfo
/ScoreInfo
This commit is contained in:
parent
54804ebfbd
commit
9b33fbbee5
@ -185,7 +185,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
public int BeatmapVersion;
|
public int BeatmapVersion;
|
||||||
|
|
||||||
public BeatmapInfo Clone() => (BeatmapInfo)MemberwiseClone();
|
public BeatmapInfo Clone() => (BeatmapInfo)this.Detach().MemberwiseClone();
|
||||||
|
|
||||||
public override string ToString() => this.GetDisplayTitle();
|
public override string ToString() => this.GetDisplayTitle();
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ namespace osu.Game.Scoring
|
|||||||
|
|
||||||
public ScoreInfo DeepClone()
|
public ScoreInfo DeepClone()
|
||||||
{
|
{
|
||||||
var clone = (ScoreInfo)MemberwiseClone();
|
var clone = (ScoreInfo)this.Detach().MemberwiseClone();
|
||||||
|
|
||||||
clone.Statistics = new Dictionary<HitResult, int>(clone.Statistics);
|
clone.Statistics = new Dictionary<HitResult, int>(clone.Statistics);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user