perf: DelegateExtensions.InvokeSafe marked obsolete for memory allocation reasons, soon to be removed
This commit is contained in:
@@ -14,7 +14,7 @@ public class EntityRegistry
|
||||
public void Add(IEntity entity)
|
||||
{
|
||||
if (registeredEntities.TryAdd(entity.Id, entity))
|
||||
OnEntityRegistered?.InvokeSafe(this, entity);
|
||||
OnEntityRegistered?.Invoke(this, entity);
|
||||
}
|
||||
|
||||
public void QueueAssign(string id, Action<IEntity> setMethod)
|
||||
@@ -26,7 +26,7 @@ public class EntityRegistry
|
||||
public void AssignAll()
|
||||
{
|
||||
foreach ((string id, Action<IEntity>? action) in assignCallbacks)
|
||||
action?.InvokeSafe(registeredEntities[id]);
|
||||
action?.Invoke(registeredEntities[id]);
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
|
Reference in New Issue
Block a user