mirror of
https://github.com/ppy/osu.git
synced 2025-02-04 23:43:00 +08:00
Revert drive-by changes
This commit is contained in:
parent
a031c8e0b6
commit
c1a1e3acc5
@ -131,7 +131,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual Mod CreateCopy()
|
public virtual Mod CreateCopy()
|
||||||
{
|
{
|
||||||
var result = (Mod)Activator.CreateInstance(GetType(), true);
|
var result = (Mod)Activator.CreateInstance(GetType());
|
||||||
result.CopyFrom(this);
|
result.CopyFrom(this);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
var theirBindable = prop.GetValue(them);
|
var theirBindable = prop.GetValue(them);
|
||||||
|
|
||||||
// The bindables themselves are readonly, so the value must be transferred through the Bindable<T>.Value property.
|
// 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);
|
Debug.Assert(valueProperty != null);
|
||||||
|
|
||||||
valueProperty.SetValue(ourBindable, valueProperty.GetValue(theirBindable));
|
valueProperty.SetValue(ourBindable, valueProperty.GetValue(theirBindable));
|
||||||
|
Loading…
Reference in New Issue
Block a user