Avoid unnecessary Location and Point allocations

This commit is contained in:
ClemensFischer 2025-12-12 21:28:45 +01:00
parent f44d2207e5
commit e268be2948
20 changed files with 205 additions and 172 deletions

View file

@ -84,10 +84,7 @@ namespace MapControl
private void AddPolylinePoints(PathFigureCollection figures, IEnumerable<Location> locations, double longitudeOffset, bool closed)
{
var points = locations
.Select(location => LocationToView(location, longitudeOffset))
.Where(point => point.HasValue)
.Select(point => point.Value);
var points = LocationsToView(locations, longitudeOffset);
if (points.Any())
{