Combine statements
This commit is contained in:
parent
371989b34d
commit
9f0d47ed59
@ -66,10 +66,9 @@ namespace Pathfinding
|
||||
|
||||
public bool TestValidConnectionForType(OsmNode node1, OsmNode node2, SpeedType type)
|
||||
{
|
||||
foreach (OsmEdge edge in node1.edges)
|
||||
foreach (OsmEdge edge in node1.edges.Where(edge => edge.neighborId.Equals(node2.nodeId)))
|
||||
{
|
||||
if (edge.neighborId.Equals(node2.nodeId))
|
||||
return TestValidConnectionForType(node1, edge, type);
|
||||
return TestValidConnectionForType(node1, edge, type);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user