mirror of
https://github.com/ppy/osu.git
synced 2025-02-19 16:03:14 +08:00
Use DeepClone
instead of reflection call
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
This commit is contained in:
parent
8240b645b4
commit
25941f6187
@ -160,11 +160,7 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
{
|
{
|
||||||
foreach (var controlPoint in selected.ControlPoints)
|
foreach (var controlPoint in selected.ControlPoints)
|
||||||
{
|
{
|
||||||
if (Activator.CreateInstance(controlPoint.GetType()) is ControlPoint copy)
|
group.Add(controlPoint.DeepClone());
|
||||||
{
|
|
||||||
copy.CopyFrom(controlPoint);
|
|
||||||
group.Add(copy);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user