Skip to content

Commit 2ac827f

Browse files
committed
fix indentation + naming convention
1 parent e315369 commit 2ac827f

1 file changed

Lines changed: 10 additions & 17 deletions

File tree

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

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -258,33 +258,26 @@ public static void ReadListDelta<T>(FastBufferReader reader, ref List<T> value)
258258
// For HashSet and Dictionary, we need to have some local space to hold lists we need to serialize.
259259
// We don't want to do allocations all the time and we know each one needs a maximum of three lists,
260260
// so we're going to keep static lists that we can reuse in these methods.
261-
#if UNITY_6000_6_OR_NEWER
262-
[Scripting.LifecycleManagement.AutoStaticsCleanup]
263-
#endif
264-
private static partial class ListCache<T>
261+
private static class ListCache<T>
265262
{
266-
private static List<T> s_AddedList = new List<T>();
267-
private static List<T> s_RemovedList = 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>();
263+
private static readonly List<T> k_AddedList = new List<T>();
264+
private static readonly List<T> k_RemovedList = new List<T>();
265+
private static readonly List<T> k_ChangedList = new List<T>();
273266

274267
public static List<T> GetAddedList()
275268
{
276-
s_AddedList.Clear();
277-
return s_AddedList;
269+
k_AddedList.Clear();
270+
return k_AddedList;
278271
}
279272
public static List<T> GetRemovedList()
280273
{
281-
s_RemovedList.Clear();
282-
return s_RemovedList;
274+
k_RemovedList.Clear();
275+
return k_RemovedList;
283276
}
284277
public static List<T> GetChangedList()
285278
{
286-
s_ChangedList.Clear();
287-
return s_ChangedList;
279+
k_ChangedList.Clear();
280+
return k_ChangedList;
288281
}
289282
}
290283

0 commit comments

Comments
 (0)