Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
chaupow committed Jan 24, 2018
1 parent 95b923f commit d0354d4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
6 changes: 3 additions & 3 deletions include/util/coordinate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <cstddef>
#include <iosfwd> //for std::ostream
#include <string>
#include <sstream>
#include <string>
#include <type_traits>

namespace osrm
Expand Down Expand Up @@ -262,10 +262,10 @@ struct FloatCoordinate
inline std::string toOSMLink()
{
std::stringstream link;
link << "http://www.openstreetmap.org/?mlat=" << lat << "&mlon=" << lon << "#map=19/" << lat << "/" << lon;
link << "http://www.openstreetmap.org/?mlat=" << lat << "&mlon=" << lon << "#map=19/" << lat
<< "/" << lon;
return link.str();
}

};

bool operator==(const Coordinate lhs, const Coordinate rhs);
Expand Down
23 changes: 18 additions & 5 deletions src/extractor/edge_based_graph_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
auto get_connected_road_info = [&](const auto &connected_edge) {
const auto &edge_data =
m_node_based_graph.GetEdgeData(connected_edge.eid);
return ExtractionTurnLeg(edge_data.flags.restricted,
return ExtractionTurnLeg(
edge_data.flags.restricted,
edge_data.flags.road_classification.IsMotorwayClass(),
edge_data.flags.road_classification.IsLinkClass(),
edge_data.flags.road_classification.GetNumberOfLanes(),
Expand All @@ -832,15 +833,27 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
{
if (turn != intersection.begin())
{
std::transform(intersection.begin() + 1, turn, std::back_inserter(road_legs_on_the_right), get_connected_road_info);
std::transform(intersection.begin() + 1,
turn,
std::back_inserter(road_legs_on_the_right),
get_connected_road_info);
}

std::transform(turn + 1, intersection.end(), std::back_inserter(road_legs_on_the_right), get_connected_road_info);
std::transform(turn + 1,
intersection.end(),
std::back_inserter(road_legs_on_the_right),
get_connected_road_info);
}
else
{
std::transform(intersection.begin() + 1, turn, std::back_inserter(road_legs_on_the_right), get_connected_road_info);
std::transform(turn + 1, intersection.end(), std::back_inserter(road_legs_on_the_left), get_connected_road_info);
std::transform(intersection.begin() + 1,
turn,
std::back_inserter(road_legs_on_the_right),
get_connected_road_info);
std::transform(turn + 1,
intersection.end(),
std::back_inserter(road_legs_on_the_left),
get_connected_road_info);
}

if (turn->instruction.IsUTurn() && turn != intersection.begin())
Expand Down

0 comments on commit d0354d4

Please sign in to comment.