reorder code to make it a bit more readable
This commit is contained in:
parent
07509ba5c9
commit
c5f6065280
@ -119,7 +119,14 @@ public:
|
|||||||
"{\"status\":"
|
"{\"status\":"
|
||||||
);
|
);
|
||||||
|
|
||||||
if(raw_route.lengthOfShortestPath != INT_MAX) {
|
if(INT_MAX == raw_route.lengthOfShortestPath) {
|
||||||
|
//We do not need to do much, if there is no route ;-)
|
||||||
|
reply.content.push_back(
|
||||||
|
"207,\"status_message\": \"Cannot find route between points\"}"
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
description_factory.SetStartSegment(phantom_nodes.startPhantom);
|
description_factory.SetStartSegment(phantom_nodes.startPhantom);
|
||||||
reply.content.push_back("0,"
|
reply.content.push_back("0,"
|
||||||
"\"status_message\": \"Found route between points\",");
|
"\"status_message\": \"Found route between points\",");
|
||||||
@ -137,12 +144,6 @@ public:
|
|||||||
}
|
}
|
||||||
description_factory.SetEndSegment(phantom_nodes.targetPhantom);
|
description_factory.SetEndSegment(phantom_nodes.targetPhantom);
|
||||||
description_factory.Run(facade, config.zoom_level);
|
description_factory.Run(facade, config.zoom_level);
|
||||||
} else {
|
|
||||||
//We do not need to do much, if there is no route ;-)
|
|
||||||
reply.content.push_back("207,"
|
|
||||||
"\"status_message\": \"Cannot find route between points\"}");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
reply.content.push_back("\"route_geometry\": ");
|
reply.content.push_back("\"route_geometry\": ");
|
||||||
if(config.geometry) {
|
if(config.geometry) {
|
||||||
|
Loading…
Reference in New Issue
Block a user