perf: DelegateExtensions.InvokeSafe marked obsolete for memory allocation reasons, soon to be removed

This commit is contained in:
2025-05-29 21:48:08 +03:00
parent 1b0f25e854
commit bf8fbebae3
35 changed files with 116 additions and 115 deletions

View File

@@ -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>