diff --git a/include/osr/lookup.h b/include/osr/lookup.h index 51b89ee..7244c0b 100644 --- a/include/osr/lookup.h +++ b/include/osr/lookup.h @@ -154,15 +154,13 @@ struct lookup { bitvec const* blocked) const { auto const way_prop = ways_.r_->way_properties_[wc.way_]; auto const edge_dir = reverse ? opposite(dir) : dir; - auto const way_cost = - Profile::way_cost(way_prop, flip(search_dir, edge_dir), 0U); - if (way_cost == kInfeasible) { - return node_candidate{}; - } - auto const offroad_cost = Profile::way_cost(way_prop, flip(search_dir, edge_dir), static_cast(wc.dist_to_way_)); + if (offroad_cost == kInfeasible) { + return node_candidate{}; + } + auto c = node_candidate{.lvl_ = lvl, .way_dir_ = dir, .dist_to_node_ = wc.dist_to_way_,