Use CreateCopy instead of Clone interface

I was going for conformity by using the IClonable interface, but it
doesn't look like we use it anywhere else in the project.
This commit is contained in:
Dean Herbert
2021-01-05 13:13:51 +09:00
parent b7dd54847f
commit caa88c6100
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ using osu.Framework.Lists;
namespace osu.Game.Beatmaps.ControlPoints namespace osu.Game.Beatmaps.ControlPoints
{ {
[Serializable] [Serializable]
public class ControlPointInfo : ICloneable public class ControlPointInfo
{ {
/// <summary> /// <summary>
/// All control points grouped by time. /// All control points grouped by time.
@ -298,7 +298,7 @@ namespace osu.Game.Beatmaps.ControlPoints
} }
} }
public object Clone() public ControlPointInfo CreateCopy()
{ {
var controlPointInfo = new ControlPointInfo(); var controlPointInfo = new ControlPointInfo();

View File

@ -112,7 +112,7 @@ namespace osu.Game.Beatmaps
// Convert // Convert
IBeatmap converted = converter.Convert(cancellationSource.Token); IBeatmap converted = converter.Convert(cancellationSource.Token);
converted.ControlPointInfo = (ControlPointInfo)converted.ControlPointInfo.Clone(); converted.ControlPointInfo = converted.ControlPointInfo.CreateCopy();
// Apply conversion mods to the result // Apply conversion mods to the result
foreach (var mod in mods.OfType<IApplicableAfterBeatmapConversion>()) foreach (var mod in mods.OfType<IApplicableAfterBeatmapConversion>())