Skip to content

Commit e315369

Browse files
Apply suggestion from @noellie-velez
1 parent 935ebe1 commit e315369

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

com.unity.netcode.gameobjects/Runtime/NetworkVariable/Serialization/CollectionSerializationUtility.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,11 @@ private static partial class ListCache<T>
265265
{
266266
private static List<T> s_AddedList = new List<T>();
267267
private static List<T> s_RemovedList = new List<T>();
268-
private static List<T> s_ChangedList = new List<T>();
268+
private static class ListCache<T>
269+
{
270+
private static readonly List<T> s_AddedList = new List<T>();
271+
private static readonly List<T> s_RemovedList = new List<T>();
272+
private static readonly List<T> s_ChangedList = new List<T>();
269273

270274
public static List<T> GetAddedList()
271275
{

0 commit comments

Comments
 (0)