Revert drive-by changes

This commit is contained in:
Salman Ahmed 2021-01-01 15:40:40 +03:00
parent a031c8e0b6
commit c1a1e3acc5
1 changed files with 2 additions and 2 deletions

View File

@ -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));