Fix formatting.
This commit is contained in:
parent
2aa9e2859a
commit
469c3331e4
@ -212,8 +212,12 @@ template <typename RTreeT, typename DataFacadeT> class GeospatialQuery
|
||||
bool has_big_component = false;
|
||||
auto results = rtree.Nearest(
|
||||
input_coordinate,
|
||||
[this, approach, &input_coordinate, &has_big_component, &has_small_component, &use_all_edges](
|
||||
const CandidateSegment &segment) {
|
||||
[this,
|
||||
approach,
|
||||
&input_coordinate,
|
||||
&has_big_component,
|
||||
&has_small_component,
|
||||
&use_all_edges](const CandidateSegment &segment) {
|
||||
auto use_segment =
|
||||
(!has_small_component || (!has_big_component && !IsTinyComponent(segment)));
|
||||
auto use_directions = std::make_pair(use_segment, use_segment);
|
||||
@ -259,8 +263,12 @@ template <typename RTreeT, typename DataFacadeT> class GeospatialQuery
|
||||
bool has_big_component = false;
|
||||
auto results = rtree.Nearest(
|
||||
input_coordinate,
|
||||
[this, approach, &input_coordinate, &has_big_component, &has_small_component, &use_all_edges](
|
||||
const CandidateSegment &segment) {
|
||||
[this,
|
||||
approach,
|
||||
&input_coordinate,
|
||||
&has_big_component,
|
||||
&has_small_component,
|
||||
&use_all_edges](const CandidateSegment &segment) {
|
||||
auto use_segment =
|
||||
(!has_small_component || (!has_big_component && !IsTinyComponent(segment)));
|
||||
auto use_directions = std::make_pair(use_segment, use_segment);
|
||||
|
@ -1022,8 +1022,7 @@ argumentsToRouteParameter(const Nan::FunctionCallbackInfo<v8::Value> &args,
|
||||
return route_parameters_ptr();
|
||||
}
|
||||
const Nan::Utf8String snapping_utf8str(snapping);
|
||||
std::string snapping_str{*snapping_utf8str,
|
||||
*snapping_utf8str + snapping_utf8str.length()};
|
||||
std::string snapping_str{*snapping_utf8str, *snapping_utf8str + snapping_utf8str.length()};
|
||||
|
||||
if (snapping_str == "default")
|
||||
{
|
||||
|
@ -87,7 +87,10 @@ Status ViaRoutePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithm
|
||||
return Status::Error;
|
||||
|
||||
const auto &facade = algorithms.GetFacade();
|
||||
auto phantom_node_pairs = GetPhantomNodes(facade, route_parameters, (route_parameters.snapping == api::RouteParameters::SnappingType::Any));
|
||||
auto phantom_node_pairs =
|
||||
GetPhantomNodes(facade,
|
||||
route_parameters,
|
||||
(route_parameters.snapping == api::RouteParameters::SnappingType::Any));
|
||||
if (phantom_node_pairs.size() != route_parameters.coordinates.size())
|
||||
{
|
||||
return Error("NoSegment",
|
||||
|
Loading…
Reference in New Issue
Block a user