Skip to content

Commit

Permalink
remove empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
djfhe committed Jul 16, 2024
1 parent 927a865 commit 67b053d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 17 deletions.
2 changes: 0 additions & 2 deletions include/osr/extract/tags.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ struct foot_profile {
if (t.is_elevator_ || t.is_parking_) {
return true;
}

switch (cista::hash(t.highway_)) {
case cista::hash("primary"):
case cista::hash("primary_link"):
Expand Down Expand Up @@ -331,7 +330,6 @@ struct car_profile {
case cista::hash("designated"):
case cista::hash("permissive"): [[fallthrough]];
case cista::hash("yes"): return override::kWhitelist;

default: return override::kNone;
}
};
Expand Down
1 change: 0 additions & 1 deletion include/osr/geojson.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ struct geojson_writer {
w_.way_osm_idx_[w_.r_->node_ways_[n][r.to_]]};
}))},
{"label", ss.str().empty() ? "unreachable" : ss.str()}};

features_.emplace_back(boost::json::value{
{"type", "Feature"},
{"properties", properties},
Expand Down
13 changes: 0 additions & 13 deletions include/osr/routing/route.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,10 @@ double add_path(ways const& w,
direction const dir) {
auto const& [way, from_idx, to_idx, is_loop, distance] =
find_connecting_way<Profile>(w, from, to, expected_cost, dir);

auto j = 0U;
auto active = false;
auto& segment = path.emplace_back();

segment.way_ = way;

segment.dist_ = distance;

// we can use the expected cost here, since it gets validated in
Expand All @@ -157,13 +154,10 @@ double add_path(ways const& w,
infinite(reverse(utl::zip(w.way_osm_nodes_[way], w.way_polylines_[way]),
(from_idx > to_idx) ^ is_loop),
is_loop)) {

utl::verify(j++ != 2 * w.way_polylines_[way].size() + 1U, "infinite loop");

if (!active && w.node_to_osm_[r.way_nodes_[way][from_idx]] == osm_idx) {
active = true;
}

if (active) {
if (w.node_to_osm_[r.way_nodes_[way][from_idx]] == osm_idx) {
// Again "from" node, then it's shorter to start from here.
Expand All @@ -176,7 +170,6 @@ double add_path(ways const& w,
}
}
}

return distance;
}

Expand All @@ -189,14 +182,11 @@ path reconstruct(ways const& w,
cost_t const cost,
direction const dir) {
auto n = dest_node;

auto segments = std::vector<path::segment>{{.polyline_ = dest.path_,
.from_level_ = dest.lvl_,
.to_level_ = dest.lvl_,
.way_ = way_idx_t::invalid()}};

auto dist = 0.0;

while (true) {
auto const& e = d.cost_.at(n.get_key());
auto const pred = e.pred(n);
Expand All @@ -212,14 +202,11 @@ path reconstruct(ways const& w,

auto const& start_node =
n.get_node() == start.left_.node_ ? start.left_ : start.right_;

segments.push_back({.polyline_ = start_node.path_,
.from_level_ = start_node.lvl_,
.to_level_ = start_node.lvl_,
.way_ = way_idx_t::invalid()});

std::reverse(begin(segments), end(segments));

return {.cost_ = cost,
.dist_ = start_node.dist_to_node_ + dist + dest.dist_to_node_,
.segments_ = segments};
Expand Down
1 change: 0 additions & 1 deletion src/extract.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ struct way_handler : public osm::handler::Handler {
auto const p = (t.is_platform_ || t.is_parking_ || !t.highway_.empty())
? get_way_properties(t)
: it->second;

if (!p.is_accessible()) {
return;
}
Expand Down

0 comments on commit 67b053d

Please sign in to comment.