Fix formating for cherry-picked commit

This commit is contained in:
Patrick Niklaus 2017-03-09 12:05:01 +00:00
parent 66cc99703c
commit 47d000301f
2 changed files with 10 additions and 6 deletions

View File

@ -558,9 +558,10 @@ Status TilePlugin::HandleRequest(const std::shared_ptr<const datafacade::BaseDat
const auto sum_node_weight = std::accumulate(approach_weight_vector.begin(),
approach_weight_vector.end(),
EdgeWeight{0});
const auto sum_node_duration = std::accumulate(approach_duration_vector.begin(),
approach_duration_vector.end(),
EdgeWeight{0});
const auto sum_node_duration =
std::accumulate(approach_duration_vector.begin(),
approach_duration_vector.end(),
EdgeWeight{0});
// The edge.weight is the whole edge weight, which includes the turn
// cost.
@ -619,8 +620,11 @@ Status TilePlugin::HandleRequest(const std::shared_ptr<const datafacade::BaseDat
// Save everything we need to later add all the points to the tile.
// We need the coordinate of the intersection, the angle in, the turn
// angle and the turn cost.
all_turn_data.emplace_back(
coord_via, angle_in_index, turn_angle_index, turn_weight_index, turn_duration_index);
all_turn_data.emplace_back(coord_via,
angle_in_index,
turn_angle_index,
turn_weight_index,
turn_duration_index);
}
}
}

View File

@ -264,7 +264,7 @@ BOOST_AUTO_TEST_CASE(test_tile_turns)
BOOST_CHECK_EQUAL(*iter++, 2); // cost key
found_penalties_indexes.push_back(*iter++); // skip value check, can be valud uint32
BOOST_CHECK_EQUAL(*iter++, 3); // weight key
found_weight_indexes.push_back(*iter++); // skip value check, can be valud uint32
found_weight_indexes.push_back(*iter++); // skip value check, can be valud uint32
BOOST_CHECK(iter == feature_iter_pair.end());
// geometry
feature_message.next();