1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Rename param to match method body

This commit is contained in:
Bartłomiej Dach 2021-01-10 15:35:53 +01:00
parent 95ad324a39
commit 4b4adc927c

View File

@ -134,18 +134,18 @@ namespace osu.Game.Rulesets.Mods
}
/// <summary>
/// Copies mod setting values from <paramref name="them"/> into this instance.
/// Copies mod setting values from <paramref name="source"/> into this instance.
/// </summary>
/// <param name="them">The mod to copy properties from.</param>
public void CopyFrom(Mod them)
/// <param name="source">The mod to copy properties from.</param>
public void CopyFrom(Mod source)
{
if (them.GetType() != GetType())
throw new ArgumentException($"Expected mod of type {GetType()}, got {them.GetType()}.", nameof(them));
if (source.GetType() != GetType())
throw new ArgumentException($"Expected mod of type {GetType()}, got {source.GetType()}.", nameof(source));
foreach (var (_, prop) in this.GetSettingsSourceProperties())
{
var targetBindable = (IBindable)prop.GetValue(this);
var sourceBindable = (IBindable)prop.GetValue(them);
var sourceBindable = (IBindable)prop.GetValue(source);
// we only care about changes that have been made away from defaults.
if (!sourceBindable.IsDefault)