Add abstraction to change the data facade at compile time

This commit is contained in:
Patrick Niklaus
2017-07-13 13:05:08 +00:00
committed by Patrick Niklaus
parent b2ed46efb5
commit 49f0b1eb59
33 changed files with 267 additions and 275 deletions
+5 -5
View File
@@ -19,14 +19,14 @@ namespace plugins
NearestPlugin::NearestPlugin(const int max_results_) : max_results{max_results_} {}
Status
NearestPlugin::HandleRequest(const datafacade::ContiguousInternalMemoryDataFacadeBase &facade,
const RoutingAlgorithmsInterface & /*algorithms*/,
const api::NearestParameters &params,
util::json::Object &json_result) const
Status NearestPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
const api::NearestParameters &params,
util::json::Object &json_result) const
{
BOOST_ASSERT(params.IsValid());
const auto &facade = algorithms.GetFacade();
if (max_results > 0 &&
(boost::numeric_cast<std::int64_t>(params.number_of_results) > max_results))
{