GetDataRunnable: Avoid allocations

Signed-off-by: Taylor Smock <tsmock@fb.com>
pull/1/head
Taylor Smock 2022-05-31 14:47:47 -06:00
rodzic 5a74db8351
commit ebc1725a10
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -409,7 +409,7 @@ public class GetDataRunnable extends RecursiveTask<DataSet> {
} }
private static boolean onlyHasHighwayParents(Node node) { private static boolean onlyHasHighwayParents(Node node) {
return node.getReferrers().stream().allMatch(prim -> prim.hasKey("highway")); return node.referrers(OsmPrimitive.class).allMatch(prim -> prim.hasKey("highway"));
} }
private static boolean basicNodeChecks(Node nearNode, Node node) { private static boolean basicNodeChecks(Node nearNode, Node node) {