Add abstraction to change the data facade at compile time
This commit is contained in:
committed by
Patrick Niklaus
parent
b2ed46efb5
commit
49f0b1eb59
@@ -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 ¶ms,
|
||||
util::json::Object &json_result) const
|
||||
Status NearestPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
|
||||
const api::NearestParameters ¶ms,
|
||||
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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user