From 87ac7fc4032c1edbc246e7f7a96881f1284c04b9 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 23 May 2022 12:57:33 -0400 Subject: [PATCH] fix nullable annotations in NetListWatcher --- .../Framework/StateTracking/FieldWatchers/NetListWatcher.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs index 79c3cb8b..3badb533 100644 --- a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs +++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs @@ -102,7 +102,7 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers /// The list index which changed. /// The previous value. /// The new value. - private void OnElementChanged(NetList> list, int index, TValue oldValue, TValue newValue) + private void OnElementChanged(NetList> list, int index, TValue? oldValue, TValue? newValue) { this.Remove(oldValue); this.Add(newValue); @@ -110,7 +110,7 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers /// Track an added item. /// The value that was added. - private void Add(TValue value) + private void Add(TValue? value) { if (value == null) return; @@ -126,7 +126,7 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers /// Track a removed item. /// The value that was removed. - private void Remove(TValue value) + private void Remove(TValue? value) { if (value == null) return;