diff --git a/Library/OSRM.h b/Library/OSRM.h index 5e3480249..372e82c39 100644 --- a/Library/OSRM.h +++ b/Library/OSRM.h @@ -46,7 +46,7 @@ class OSRM std::unique_ptr OSRM_pimpl_; public: - explicit OSRM(const ServerPaths &paths, const bool use_shared_memory = false); + explicit OSRM(ServerPaths paths, const bool use_shared_memory = false); ~OSRM(); void RunQuery(RouteParameters &route_parameters, http::Reply &reply); }; diff --git a/Library/OSRM_impl.cpp b/Library/OSRM_impl.cpp index 0bbdc7da7..b1c7ef2fb 100644 --- a/Library/OSRM_impl.cpp +++ b/Library/OSRM_impl.cpp @@ -58,8 +58,7 @@ namespace boost { namespace interprocess { class named_mutex; } } #include #include -OSRM_impl::OSRM_impl(const ServerPaths &paths, const bool use_shared_memory) - : server_paths(paths) +OSRM_impl::OSRM_impl(ServerPaths server_paths, const bool use_shared_memory) { if (use_shared_memory) { @@ -158,7 +157,7 @@ void OSRM_impl::RunQuery(RouteParameters &route_parameters, http::Reply &reply) // proxy code for compilation firewall -OSRM::OSRM(const ServerPaths &paths, const bool use_shared_memory) +OSRM::OSRM(ServerPaths paths, const bool use_shared_memory) : OSRM_pimpl_(osrm::make_unique(paths, use_shared_memory)) { } diff --git a/Library/OSRM_impl.h b/Library/OSRM_impl.h index 38b919a8d..803a5b065 100644 --- a/Library/OSRM_impl.h +++ b/Library/OSRM_impl.h @@ -48,7 +48,7 @@ class OSRM_impl using PluginMap = std::unordered_map; public: - OSRM_impl(const ServerPaths &paths, const bool use_shared_memory); + OSRM_impl(ServerPaths paths, const bool use_shared_memory); OSRM_impl(const OSRM_impl &) = delete; virtual ~OSRM_impl(); void RunQuery(RouteParameters &route_parameters, http::Reply &reply); @@ -56,7 +56,6 @@ class OSRM_impl private: void RegisterPlugin(BasePlugin *plugin); PluginMap plugin_map; - ServerPaths server_paths; bool use_shared_memory; SharedBarriers *barrier; // base class pointer to the objects