Adapts Nearest plugin to new API

This commit is contained in:
Daniel J. Hofmann
2016-02-17 13:49:44 -08:00
committed by Patrick Niklaus
parent d572d77b48
commit c75b497b2e
7 changed files with 122 additions and 98 deletions
+4 -2
View File
@@ -15,6 +15,8 @@
#include <string>
#include <vector>
#include <boost/assert.hpp>
namespace osrm
{
namespace engine
@@ -58,7 +60,7 @@ Status TablePlugin::HandleRequest(const api::TableParameters &params, util::json
auto snapped_phantoms = SnapPhantomNodes(GetPhantomNodes(params));
const auto result_table = [&]()
const auto result_table = [&]
{
if (params.sources.empty())
{
@@ -76,7 +78,7 @@ Status TablePlugin::HandleRequest(const api::TableParameters &params, util::json
return Error("no-table", "No table found", result);
}
api::TableAPI table_api {facade, params};
api::TableAPI table_api{facade, params};
table_api.MakeResponse(result_table, snapped_phantoms, result);
return Status::Ok;