rename JSON namespace to osrm::json to avoid namespace clash with V8
This commit is contained in:
+5
-2
@@ -35,10 +35,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
class OSRM_impl;
|
||||
struct RouteParameters;
|
||||
|
||||
namespace JSON
|
||||
namespace osrm
|
||||
{
|
||||
namespace json
|
||||
{
|
||||
struct Object;
|
||||
}
|
||||
}
|
||||
|
||||
class OSRM
|
||||
{
|
||||
@@ -48,7 +51,7 @@ class OSRM
|
||||
public:
|
||||
explicit OSRM(libosrm_config &lib_config);
|
||||
~OSRM();
|
||||
int RunQuery(RouteParameters &route_parameters, JSON::Object &json_result);
|
||||
int RunQuery(RouteParameters &route_parameters, osrm::json::Object &json_result);
|
||||
};
|
||||
|
||||
#endif // OSRM_HPP
|
||||
|
||||
@@ -104,7 +104,7 @@ void OSRM_impl::RegisterPlugin(BasePlugin *plugin)
|
||||
plugin_map.emplace(plugin->GetDescriptor(), plugin);
|
||||
}
|
||||
|
||||
int OSRM_impl::RunQuery(RouteParameters &route_parameters, JSON::Object &json_result)
|
||||
int OSRM_impl::RunQuery(RouteParameters &route_parameters, osrm::json::Object &json_result)
|
||||
{
|
||||
const auto &plugin_iterator = plugin_map.find(route_parameters.service);
|
||||
|
||||
@@ -172,7 +172,7 @@ OSRM::OSRM(libosrm_config &lib_config) : OSRM_pimpl_(osrm::make_unique<OSRM_impl
|
||||
|
||||
OSRM::~OSRM() { OSRM_pimpl_.reset(); }
|
||||
|
||||
int OSRM::RunQuery(RouteParameters &route_parameters, JSON::Object &json_result)
|
||||
int OSRM::RunQuery(RouteParameters &route_parameters, osrm::json::Object &json_result)
|
||||
{
|
||||
return OSRM_pimpl_->RunQuery(route_parameters, json_result);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class OSRM_impl
|
||||
OSRM_impl(libosrm_config &lib_config);
|
||||
OSRM_impl(const OSRM_impl &) = delete;
|
||||
virtual ~OSRM_impl();
|
||||
int RunQuery(RouteParameters &route_parameters, JSON::Object &json_result);
|
||||
int RunQuery(RouteParameters &route_parameters, osrm::json::Object &json_result);
|
||||
|
||||
private:
|
||||
void RegisterPlugin(BasePlugin *plugin);
|
||||
|
||||
Reference in New Issue
Block a user