fix nullable annotations in NetListWatcher

This commit is contained in:
Jesse Plamondon-Willard 2022-05-23 12:57:33 -04:00
parent 9933acad35
commit 87ac7fc403
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
1 changed files with 3 additions and 3 deletions

View File

@ -102,7 +102,7 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers
/// <param name="index">The list index which changed.</param>
/// <param name="oldValue">The previous value.</param>
/// <param name="newValue">The new value.</param>
private void OnElementChanged(NetList<TValue, NetRef<TValue>> list, int index, TValue oldValue, TValue newValue)
private void OnElementChanged(NetList<TValue, NetRef<TValue>> list, int index, TValue? oldValue, TValue? newValue)
{
this.Remove(oldValue);
this.Add(newValue);
@ -110,7 +110,7 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers
/// <summary>Track an added item.</summary>
/// <param name="value">The value that was added.</param>
private void Add(TValue value)
private void Add(TValue? value)
{
if (value == null)
return;
@ -126,7 +126,7 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers
/// <summary>Track a removed item.</summary>
/// <param name="value">The value that was removed.</param>
private void Remove(TValue value)
private void Remove(TValue? value)
{
if (value == null)
return;