1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 20:05:29 +08:00

Use DeepClone instead of reflection call

Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
This commit is contained in:
Dean Herbert 2022-06-01 10:47:45 +09:00 committed by GitHub
parent 8240b645b4
commit 25941f6187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,11 +160,7 @@ namespace osu.Game.Screens.Edit.Timing
{
foreach (var controlPoint in selected.ControlPoints)
{
if (Activator.CreateInstance(controlPoint.GetType()) is ControlPoint copy)
{
copy.CopyFrom(controlPoint);
group.Add(copy);
}
group.Add(controlPoint.DeepClone());
}
}
}