Remove unnecessary includes and rename in Engine
This commit is contained in:
parent
710ba20acc
commit
a7bb26f2d6
@ -1,7 +1,6 @@
|
||||
#ifndef ENGINE_HPP
|
||||
#define ENGINE_HPP
|
||||
|
||||
#include "storage/shared_barriers.hpp"
|
||||
#include "engine/api/match_parameters.hpp"
|
||||
#include "engine/api/nearest_parameters.hpp"
|
||||
#include "engine/api/route_parameters.hpp"
|
||||
@ -23,7 +22,6 @@
|
||||
#include "util/json_container.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
namespace osrm
|
||||
@ -50,7 +48,6 @@ class Engine final
|
||||
Status Tile(const api::TileParameters ¶meters, std::string &result) const;
|
||||
|
||||
private:
|
||||
//std::unique_ptr<storage::SharedBarriers> lock;
|
||||
std::unique_ptr<DataWatchdog> watchdog;
|
||||
|
||||
const plugins::ViaRoutePlugin route_plugin;
|
||||
|
@ -27,22 +27,22 @@ namespace
|
||||
template <typename ParameterT, typename PluginT, typename ResultT>
|
||||
osrm::engine::Status
|
||||
RunQuery(const std::unique_ptr<osrm::engine::DataWatchdog> &watchdog,
|
||||
const std::shared_ptr<osrm::engine::datafacade::BaseDataFacade> &facade,
|
||||
const std::shared_ptr<osrm::engine::datafacade::BaseDataFacade> &immutable_facade,
|
||||
const ParameterT ¶meters,
|
||||
PluginT &plugin,
|
||||
ResultT &result)
|
||||
{
|
||||
if (watchdog)
|
||||
{
|
||||
BOOST_ASSERT(!facade);
|
||||
BOOST_ASSERT(!immutable_facade);
|
||||
auto facade = watchdog->GetDataFacade();
|
||||
|
||||
return plugin.HandleRequest(facade, parameters, result);
|
||||
}
|
||||
|
||||
BOOST_ASSERT(facade);
|
||||
BOOST_ASSERT(immutable_facade);
|
||||
|
||||
return plugin.HandleRequest(facade, parameters, result);
|
||||
return plugin.HandleRequest(immutable_facade, parameters, result);
|
||||
}
|
||||
|
||||
} // anon. ns
|
||||
|
Loading…
Reference in New Issue
Block a user