Apply formatting
This commit is contained in:
parent
e20ae3c149
commit
1b68000ad8
@ -538,7 +538,9 @@ inline bool argumentsToParameter(const Napi::CallbackInfo &args,
|
|||||||
|
|
||||||
if (!obj.Has("radiuses") && default_radius.IsUndefined())
|
if (!obj.Has("radiuses") && default_radius.IsUndefined())
|
||||||
{
|
{
|
||||||
ThrowError(args.Env(), "Bearings must be accompanied with radiuses or a default_radius must be set.");
|
ThrowError(
|
||||||
|
args.Env(),
|
||||||
|
"Bearings must be accompanied with radiuses or a default_radius must be set.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +131,8 @@ Status MatchPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
|
|||||||
return Error("InvalidValue", "Invalid coordinate value.", result);
|
return Error("InvalidValue", "Invalid coordinate value.", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!parameters.bearings.empty() && !default_radius.has_value() && parameters.radiuses.size() != parameters.bearings.size())
|
if (!parameters.bearings.empty() && !default_radius.has_value() &&
|
||||||
|
parameters.radiuses.size() != parameters.bearings.size())
|
||||||
{
|
{
|
||||||
return Error(
|
return Error(
|
||||||
"InvalidOptions", "Number of radiuses does not match number of bearings", result);
|
"InvalidOptions", "Number of radiuses does not match number of bearings", result);
|
||||||
|
@ -43,7 +43,8 @@ Status NearestPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms
|
|||||||
return Error("InvalidOptions", "Only one input coordinate is supported", result);
|
return Error("InvalidOptions", "Only one input coordinate is supported", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!params.bearings.empty() && !default_radius.has_value() && params.radiuses.size() != params.bearings.size())
|
if (!params.bearings.empty() && !default_radius.has_value() &&
|
||||||
|
params.radiuses.size() != params.bearings.size())
|
||||||
{
|
{
|
||||||
return Error(
|
return Error(
|
||||||
"InvalidOptions", "Number of radiuses does not match number of bearings", result);
|
"InvalidOptions", "Number of radiuses does not match number of bearings", result);
|
||||||
|
@ -44,7 +44,8 @@ Status TablePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
|
|||||||
"InvalidOptions", "Number of bearings does not match number of coordinates", result);
|
"InvalidOptions", "Number of bearings does not match number of coordinates", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!params.bearings.empty() && !default_radius.has_value() && params.radiuses.size() != params.bearings.size())
|
if (!params.bearings.empty() && !default_radius.has_value() &&
|
||||||
|
params.radiuses.size() != params.bearings.size())
|
||||||
{
|
{
|
||||||
return Error(
|
return Error(
|
||||||
"InvalidOptions", "Number of radiuses does not match number of bearings", result);
|
"InvalidOptions", "Number of radiuses does not match number of bearings", result);
|
||||||
|
@ -82,7 +82,8 @@ Status ViaRoutePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithm
|
|||||||
if (!CheckAlgorithms(route_parameters, algorithms, result))
|
if (!CheckAlgorithms(route_parameters, algorithms, result))
|
||||||
return Status::Error;
|
return Status::Error;
|
||||||
|
|
||||||
if(!route_parameters.bearings.empty() && !default_radius.has_value() && route_parameters.radiuses.size() != route_parameters.bearings.size())
|
if (!route_parameters.bearings.empty() && !default_radius.has_value() &&
|
||||||
|
route_parameters.radiuses.size() != route_parameters.bearings.size())
|
||||||
{
|
{
|
||||||
return Error(
|
return Error(
|
||||||
"InvalidOptions", "Number of radiuses does not match number of bearings", result);
|
"InvalidOptions", "Number of radiuses does not match number of bearings", result);
|
||||||
|
Loading…
Reference in New Issue
Block a user