perf: DelegateExtensions.InvokeSafe marked obsolete for memory allocation reasons, soon to be removed
This commit is contained in:
@@ -21,7 +21,7 @@ public class StateEnable : IStateEnable
|
||||
|
||||
bool previousState = _enabled;
|
||||
_enabled = value;
|
||||
OnEnabledChanged?.InvokeSafe(this, previousState);
|
||||
OnEnabledChanged?.Invoke(this, previousState);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class StateEnable : IStateEnable
|
||||
|
||||
_entity = entity;
|
||||
OnAssign(entity);
|
||||
OnEntityAssigned?.InvokeSafe(this);
|
||||
OnEntityAssigned?.Invoke(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class StateEnable : IStateEnable
|
||||
return false;
|
||||
|
||||
_entity = null!;
|
||||
OnUnassigned?.InvokeSafe(this);
|
||||
OnUnassigned?.Invoke(this);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user