Address PR comments
Renamed lua_function_exists and removes unused print function
This commit is contained in:
@@ -40,7 +40,7 @@ namespace osrm
|
||||
namespace extractor
|
||||
{
|
||||
|
||||
class ProfileProperties;
|
||||
struct ProfileProperties;
|
||||
|
||||
class Extractor
|
||||
{
|
||||
|
||||
@@ -21,8 +21,6 @@ class GraphCompressor
|
||||
using EdgeData = util::NodeBasedDynamicGraph::EdgeData;
|
||||
|
||||
public:
|
||||
GraphCompressor();
|
||||
|
||||
void Compress(const std::unordered_set<NodeID> &barrier_nodes,
|
||||
const std::unordered_set<NodeID> &traffic_lights,
|
||||
RestrictionMap &restriction_map,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef PROFILE_PROPERTIES_HPP
|
||||
#define PROFILE_PROPERTIES_HPP
|
||||
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace extractor
|
||||
@@ -20,7 +22,7 @@ struct ProfileProperties
|
||||
|
||||
void SetUturnPenalty(const double u_turn_penalty_)
|
||||
{
|
||||
u_turn_penalty = static_cast<int>(u_turn_penalty_ * 10.);
|
||||
u_turn_penalty = boost::numeric_cast<int>(u_turn_penalty_ * 10.);
|
||||
}
|
||||
|
||||
double GetTrafficSignalPenalty() const
|
||||
@@ -30,7 +32,7 @@ struct ProfileProperties
|
||||
|
||||
void SetTrafficSignalPenalty(const double traffic_signal_penalty_)
|
||||
{
|
||||
traffic_signal_penalty = static_cast<int>(traffic_signal_penalty_ * 10.);
|
||||
traffic_signal_penalty = boost::numeric_cast<int>(traffic_signal_penalty_ * 10.);
|
||||
}
|
||||
|
||||
//! penalty to cross a traffic light in deci-seconds
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "extractor/profile_properties.hpp"
|
||||
#include "extractor/raster_source.hpp"
|
||||
|
||||
#include "util/lua_util.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
@@ -28,12 +30,9 @@ class ScriptingEnvironment
|
||||
public:
|
||||
struct Context
|
||||
{
|
||||
Context();
|
||||
~Context();
|
||||
|
||||
ProfileProperties properties;
|
||||
SourceContainer sources;
|
||||
lua_State *state;
|
||||
util::LuaState state;
|
||||
};
|
||||
|
||||
explicit ScriptingEnvironment(const std::string &file_name);
|
||||
@@ -47,7 +46,7 @@ class ScriptingEnvironment
|
||||
void InitContext(Context &context);
|
||||
std::mutex init_mutex;
|
||||
std::string file_name;
|
||||
tbb::enumerable_thread_specific<std::shared_ptr<Context>> script_contexts;
|
||||
tbb::enumerable_thread_specific<std::unique_ptr<Context>> script_contexts;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user