Fix formatting.

This commit is contained in:
Daniel Patterson 2019-02-02 22:15:16 -08:00
parent 2aa9e2859a
commit 469c3331e4
No known key found for this signature in database
GPG Key ID: 19C12BE1725A028B
3 changed files with 20 additions and 10 deletions

View File

@ -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);

View File

@ -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")
{

View File

@ -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",