diff --git a/osu.Framework.Tests/Bindables/BindableBindingTest.cs b/osu.Framework.Tests/Bindables/BindableBindingTest.cs index e7ce25fa66..51175c78f0 100644 --- a/osu.Framework.Tests/Bindables/BindableBindingTest.cs +++ b/osu.Framework.Tests/Bindables/BindableBindingTest.cs @@ -492,8 +492,8 @@ public void TestEventArgs() bindable2.BindTo(bindable1); - ValueChangedEvent event1 = null; - ValueChangedEvent event2 = null; + ValueChangedEvent event1 = default; + ValueChangedEvent event2 = default; bindable1.BindValueChanged(e => event1 = e); bindable2.BindValueChanged(e => event2 = e); diff --git a/osu.Framework/Audio/AdjustableAudioComponent.cs b/osu.Framework/Audio/AdjustableAudioComponent.cs index 41b834da01..2ddfdb6415 100644 --- a/osu.Framework/Audio/AdjustableAudioComponent.cs +++ b/osu.Framework/Audio/AdjustableAudioComponent.cs @@ -70,7 +70,7 @@ public void RemoveAdjustment(AdjustableProperty type, IBindable adjustBi private bool invalidationPending; - internal void InvalidateState(ValueChangedEvent? valueChangedEvent = null) + internal void InvalidateState(ValueChangedEvent valueChangedEvent = default) { if (CanPerformInline) OnStateChanged(); diff --git a/osu.Framework/Bindables/AggregateBindable.cs b/osu.Framework/Bindables/AggregateBindable.cs index e65a66e95b..8411a9ae5a 100644 --- a/osu.Framework/Bindables/AggregateBindable.cs +++ b/osu.Framework/Bindables/AggregateBindable.cs @@ -85,7 +85,7 @@ public void RemoveSource(IBindable bindable) return null; } - private void recalculateAggregate(ValueChangedEvent obj = null) + private void recalculateAggregate(ValueChangedEvent obj = default) { T calculated = initialValue; diff --git a/osu.Framework/Bindables/ValueChangedEvent.cs b/osu.Framework/Bindables/ValueChangedEvent.cs index 9809faf052..9115b05ab2 100644 --- a/osu.Framework/Bindables/ValueChangedEvent.cs +++ b/osu.Framework/Bindables/ValueChangedEvent.cs @@ -7,7 +7,7 @@ namespace osu.Framework.Bindables /// An event fired when a value changes, providing the old and new value for reference. /// /// The type of bindable. - public class ValueChangedEvent + public readonly struct ValueChangedEvent { /// /// The old value.