apply clang-format

This commit is contained in:
Matt Bhagat-Conway 2023-07-20 14:00:22 -04:00
parent 5554af6e4a
commit 9ad9c2cd97
No known key found for this signature in database
GPG Key ID: EB64FF36E7DA441A
2 changed files with 35 additions and 25 deletions

View File

@ -706,7 +706,12 @@ void ExtractionContainers::PrepareEdges(ScriptingEnvironment &scripting_environm
const auto accurate_distance = const auto accurate_distance =
util::coordinate_calculation::greatCircleDistance(source_coord, target_coord); util::coordinate_calculation::greatCircleDistance(source_coord, target_coord);
ExtractionSegment segment(source_coord, target_coord, distance, weight, duration, edge_iterator->result.flags); ExtractionSegment segment(source_coord,
target_coord,
distance,
weight,
duration,
edge_iterator->result.flags);
scripting_environment.ProcessSegment(segment); scripting_environment.ProcessSegment(segment);
auto &edge = edge_iterator->result; auto &edge = edge_iterator->result;

View File

@ -471,29 +471,35 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
[](ExtractionRelationContainer &cont, const ExtractionRelation::OsmIDTyped &rel_id) [](ExtractionRelationContainer &cont, const ExtractionRelation::OsmIDTyped &rel_id)
-> const ExtractionRelation & { return cont.GetRelationData(rel_id); }); -> const ExtractionRelation & { return cont.GetRelationData(rel_id); });
context.state.new_usertype<NodeBasedEdgeClassification>("NodeBasedEdgeClassification", context.state.new_usertype<NodeBasedEdgeClassification>(
"forward", "NodeBasedEdgeClassification",
// can't just do &NodeBasedEdgeClassification::forward with bitfields "forward",
sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.forward; }), // can't just do &NodeBasedEdgeClassification::forward with bitfields
"backward", sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.forward; }),
sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.backward; }), "backward",
"is_split", sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.backward; }),
sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.is_split; }), "is_split",
"roundabout", sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.is_split; }),
sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.roundabout; }), "roundabout",
"circular", sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.roundabout; }),
sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.circular; }), "circular",
"startpoint", sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.circular; }),
sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.startpoint; }), "startpoint",
"restricted", sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.startpoint; }),
sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.restricted; }), "restricted",
"road_classification", sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.restricted; }),
sol::property([](NodeBasedEdgeClassification &c) -> RoadClassification { return c.road_classification; }), "road_classification",
"highway_turn_classification", sol::property([](NodeBasedEdgeClassification &c) -> RoadClassification {
sol::property([](NodeBasedEdgeClassification &c) -> uint8_t { return c.highway_turn_classification; }), return c.road_classification;
"access_turn_classification", }),
sol::property([](NodeBasedEdgeClassification &c) -> uint8_t { return c.access_turn_classification; }) "highway_turn_classification",
); sol::property([](NodeBasedEdgeClassification &c) -> uint8_t {
return c.highway_turn_classification;
}),
"access_turn_classification",
sol::property([](NodeBasedEdgeClassification &c) -> uint8_t {
return c.access_turn_classification;
}));
context.state.new_usertype<ExtractionSegment>("ExtractionSegment", context.state.new_usertype<ExtractionSegment>("ExtractionSegment",
"source", "source",
@ -509,7 +515,6 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
"flags", "flags",
&ExtractionSegment::flags); &ExtractionSegment::flags);
// Keep in mind .location is available only if .pbf is preprocessed to set the location with the // Keep in mind .location is available only if .pbf is preprocessed to set the location with the
// ref using osmium command "osmium add-locations-to-ways" // ref using osmium command "osmium add-locations-to-ways"
context.state.new_usertype<osmium::NodeRef>( context.state.new_usertype<osmium::NodeRef>(