mirror of https://github.com/ppy/osu
Revert drive-by changes
This commit is contained in:
parent
a031c8e0b6
commit
c1a1e3acc5
|
@ -131,7 +131,7 @@ public virtual string SettingDescription
|
|||
/// </summary>
|
||||
public virtual Mod CreateCopy()
|
||||
{
|
||||
var result = (Mod)Activator.CreateInstance(GetType(), true);
|
||||
var result = (Mod)Activator.CreateInstance(GetType());
|
||||
result.CopyFrom(this);
|
||||
return result;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ public void CopyFrom(Mod them)
|
|||
var theirBindable = prop.GetValue(them);
|
||||
|
||||
// The bindables themselves are readonly, so the value must be transferred through the Bindable<T>.Value property.
|
||||
var valueProperty = theirBindable.GetType().GetProperty(nameof(Bindable<object>.Value), BindingFlags.Public | BindingFlags.Instance);
|
||||
var valueProperty = ourBindable.GetType().GetProperty(nameof(Bindable<object>.Value), BindingFlags.Public | BindingFlags.Instance);
|
||||
Debug.Assert(valueProperty != null);
|
||||
|
||||
valueProperty.SetValue(ourBindable, valueProperty.GetValue(theirBindable));
|
||||
|
|
Loading…
Reference in New Issue