Apply clang-format
This commit is contained in:
@@ -41,7 +41,7 @@ template <class DataFacadeT> class DistanceTablePlugin final : public BasePlugin
|
||||
const std::string GetDescriptor() const override final { return descriptor_string; }
|
||||
|
||||
Status HandleRequest(const RouteParameters &route_parameters,
|
||||
osrm::json::Object &json_result) override final
|
||||
osrm::json::Object &json_result) override final
|
||||
{
|
||||
if (!check_all_coordinates(route_parameters.coordinates))
|
||||
{
|
||||
@@ -132,7 +132,8 @@ template <class DataFacadeT> class DistanceTablePlugin final : public BasePlugin
|
||||
if (!phantom_node_source_out_iter->first.is_valid(facade->GetNumberOfNodes()))
|
||||
{
|
||||
json_result.values["status_message"] =
|
||||
std::string("Could not find a matching segment for coordinate ") + std::to_string(i);
|
||||
std::string("Could not find a matching segment for coordinate ") +
|
||||
std::to_string(i);
|
||||
return Status::NoSegment;
|
||||
}
|
||||
|
||||
@@ -154,7 +155,8 @@ template <class DataFacadeT> class DistanceTablePlugin final : public BasePlugin
|
||||
if (!phantom_node_target_out_iter->first.is_valid(facade->GetNumberOfNodes()))
|
||||
{
|
||||
json_result.values["status_message"] =
|
||||
std::string("Could not find a matching segment for coordinate ") + std::to_string(i);
|
||||
std::string("Could not find a matching segment for coordinate ") +
|
||||
std::to_string(i);
|
||||
return Status::NoSegment;
|
||||
}
|
||||
phantom_node_target_out_iter++;
|
||||
|
||||
@@ -20,7 +20,7 @@ class HelloWorldPlugin final : public BasePlugin
|
||||
const std::string GetDescriptor() const override final { return descriptor_string; }
|
||||
|
||||
Status HandleRequest(const RouteParameters &routeParameters,
|
||||
osrm::json::Object &json_result) override final
|
||||
osrm::json::Object &json_result) override final
|
||||
{
|
||||
std::string temp_string;
|
||||
json_result.values["title"] = "Hello World";
|
||||
|
||||
@@ -23,7 +23,7 @@ template <class DataFacadeT> class NearestPlugin final : public BasePlugin
|
||||
const std::string GetDescriptor() const override final { return descriptor_string; }
|
||||
|
||||
Status HandleRequest(const RouteParameters &route_parameters,
|
||||
osrm::json::Object &json_result) override final
|
||||
osrm::json::Object &json_result) override final
|
||||
{
|
||||
// check number of parameters
|
||||
if (route_parameters.coordinates.empty() ||
|
||||
|
||||
@@ -16,10 +16,10 @@ class BasePlugin
|
||||
public:
|
||||
enum class Status : int
|
||||
{
|
||||
Ok = 200,
|
||||
EmptyResult = 207,
|
||||
NoSegment = 208,
|
||||
Error = 400
|
||||
Ok = 200,
|
||||
EmptyResult = 207,
|
||||
NoSegment = 208,
|
||||
Error = 400
|
||||
};
|
||||
|
||||
BasePlugin() {}
|
||||
|
||||
@@ -18,7 +18,7 @@ template <class DataFacadeT> class TimestampPlugin final : public BasePlugin
|
||||
}
|
||||
const std::string GetDescriptor() const override final { return descriptor_string; }
|
||||
Status HandleRequest(const RouteParameters &route_parameters,
|
||||
osrm::json::Object &json_result) override final
|
||||
osrm::json::Object &json_result) override final
|
||||
{
|
||||
(void)route_parameters; // unused
|
||||
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
#include "engine/trip/trip_farthest_insertion.hpp"
|
||||
#include "engine/trip/trip_brute_force.hpp"
|
||||
#include "engine/search_engine.hpp"
|
||||
#include "util/matrix_graph_wrapper.hpp" // wrapper to use tarjan
|
||||
// scc on dist table
|
||||
#include "engine/descriptors/descriptor_base.hpp" // to make json output
|
||||
#include "engine/descriptors/json_descriptor.hpp" // to make json output
|
||||
#include "util/matrix_graph_wrapper.hpp" // wrapper to use tarjan
|
||||
// scc on dist table
|
||||
#include "engine/descriptors/descriptor_base.hpp" // to make json output
|
||||
#include "engine/descriptors/json_descriptor.hpp" // to make json output
|
||||
#include "util/make_unique.hpp"
|
||||
#include "util/timing_util.hpp" // to time runtime
|
||||
#include "util/timing_util.hpp" // to time runtime
|
||||
//#include "util/simple_logger.hpp" // for logging output
|
||||
#include "util/dist_table_wrapper.hpp" // to access the dist
|
||||
// table more easily
|
||||
// table more easily
|
||||
|
||||
#include "osrm/json_container.hpp"
|
||||
#include <boost/assert.hpp>
|
||||
@@ -74,7 +74,8 @@ template <class DataFacadeT> class RoundTripPlugin final : public BasePlugin
|
||||
const int range = input_bearings.size() > 0
|
||||
? (input_bearings[i].second ? *input_bearings[i].second : 10)
|
||||
: 180;
|
||||
auto results = facade->NearestPhantomNodes(route_parameters.coordinates[i], 1, bearing, range);
|
||||
auto results =
|
||||
facade->NearestPhantomNodes(route_parameters.coordinates[i], 1, bearing, range);
|
||||
if (results.empty())
|
||||
{
|
||||
break;
|
||||
@@ -222,7 +223,7 @@ template <class DataFacadeT> class RoundTripPlugin final : public BasePlugin
|
||||
}
|
||||
|
||||
Status HandleRequest(const RouteParameters &route_parameters,
|
||||
osrm::json::Object &json_result) override final
|
||||
osrm::json::Object &json_result) override final
|
||||
{
|
||||
if (max_locations_trip > 0 &&
|
||||
(static_cast<int>(route_parameters.coordinates.size()) > max_locations_trip))
|
||||
@@ -357,7 +358,6 @@ template <class DataFacadeT> class RoundTripPlugin final : public BasePlugin
|
||||
trip.values.push_back(std::move(scc_trip));
|
||||
}
|
||||
|
||||
|
||||
if (trip.values.empty())
|
||||
{
|
||||
json_result.values["status_message"] = "Cannot find trips";
|
||||
|
||||
@@ -49,7 +49,7 @@ template <class DataFacadeT> class ViaRoutePlugin final : public BasePlugin
|
||||
const std::string GetDescriptor() const override final { return descriptor_string; }
|
||||
|
||||
Status HandleRequest(const RouteParameters &route_parameters,
|
||||
osrm::json::Object &json_result) override final
|
||||
osrm::json::Object &json_result) override final
|
||||
{
|
||||
if (max_locations_viaroute > 0 &&
|
||||
(static_cast<int>(route_parameters.coordinates.size()) > max_locations_viaroute))
|
||||
|
||||
Reference in New Issue
Block a user