From f15e0b5ed176590c5a924467a4763988e5e10f37 Mon Sep 17 00:00:00 2001 From: DCFApixels <99481254+DCFApixels@users.noreply.github.com> Date: Mon, 13 Oct 2025 12:03:38 +0800 Subject: [PATCH] Update EcsPoolBase.cs --- src/Pools/EcsPoolBase.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Pools/EcsPoolBase.cs b/src/Pools/EcsPoolBase.cs index 48ca7d5..d7423e6 100644 --- a/src/Pools/EcsPoolBase.cs +++ b/src/Pools/EcsPoolBase.cs @@ -341,17 +341,17 @@ namespace DCFApixels.DragonECS [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnAdd(this StructList self, int entityID) + internal static void InvokeOnAdd(ref this StructList self, int entityID) { for (int i = 0; i < self.Count; i++) { self[i].OnAdd(entityID); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnAdd(this StructList self, int entityID, int cachedCount) + internal static void InvokeOnAdd(ref this StructList self, int entityID, int cachedCount) { for (int i = 0; i < cachedCount; i++) { self[i].OnAdd(entityID); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnAddAndGet(this StructList self, int entityID) + internal static void InvokeOnAddAndGet(ref this StructList self, int entityID) { for (int i = 0; i < self.Count; i++) { @@ -360,7 +360,7 @@ namespace DCFApixels.DragonECS } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnAddAndGet(this StructList self, int entityID, int cachedCount) + internal static void InvokeOnAddAndGet(ref this StructList self, int entityID, int cachedCount) { for (int i = 0; i < cachedCount; i++) { @@ -369,22 +369,22 @@ namespace DCFApixels.DragonECS } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnGet(this StructList self, int entityID) + internal static void InvokeOnGet(ref this StructList self, int entityID) { for (int i = 1; i < self.Count; i++) { self[i].OnGet(entityID); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnGet(this StructList self, int entityID, int cachedCount) + internal static void InvokeOnGet(ref this StructList self, int entityID, int cachedCount) { for (int i = 1; i < cachedCount; i++) { self[i].OnGet(entityID); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnDel(this StructList self, int entityID) + internal static void InvokeOnDel(ref this StructList self, int entityID) { for (int i = 0; i < self.Count; i++) { self[i].OnDel(entityID); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void InvokeOnDel(this StructList self, int entityID, int cachedCount) + internal static void InvokeOnDel(ref this StructList self, int entityID, int cachedCount) { for (int i = 0; i < cachedCount; i++) { self[i].OnDel(entityID); } }