mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Use ctor
rather than MemberwiseClone
to guarantee a safer clone of BeatmapDifficulty
This commit is contained in:
@ -37,12 +37,7 @@ namespace osu.Game.Beatmaps
|
||||
/// <summary>
|
||||
/// Returns a shallow-clone of this <see cref="BeatmapDifficulty"/>.
|
||||
/// </summary>
|
||||
public BeatmapDifficulty Clone()
|
||||
{
|
||||
var diff = (BeatmapDifficulty)MemberwiseClone();
|
||||
CopyTo(diff);
|
||||
return diff;
|
||||
}
|
||||
public virtual BeatmapDifficulty Clone() => new BeatmapDifficulty(this);
|
||||
|
||||
public virtual void CopyTo(BeatmapDifficulty difficulty)
|
||||
{
|
||||
|
Reference in New Issue
Block a user