perf: DelegateExtensions.InvokeSafe marked obsolete for memory allocation reasons, soon to be removed
This commit is contained in:
@@ -35,7 +35,7 @@ public class Shape2D(List<Vector2D> vertices) : IEnumerable<Vector2D>
|
||||
foreach (Vector2D vertex in value)
|
||||
_vertices.Add(vertex);
|
||||
|
||||
OnShapeUpdated?.InvokeSafe(this);
|
||||
OnShapeUpdated?.Invoke(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ public class Shape2D(List<Vector2D> vertices) : IEnumerable<Vector2D>
|
||||
for (int i = 0; i < count; i++)
|
||||
to._vertices.Add(transform.Transform(from[i]));
|
||||
|
||||
to.OnShapeUpdated?.InvokeSafe(to);
|
||||
to.OnShapeUpdated?.Invoke(to);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user