diff --git a/Extractor/Extractor.cpp b/Extractor/Extractor.cpp index 7623ce100..75da39825 100644 --- a/Extractor/Extractor.cpp +++ b/Extractor/Extractor.cpp @@ -210,8 +210,7 @@ int Extractor::Run(int argc, char *argv[]) case osmium::item_type::relation: ++number_of_relations; resulting_restrictions.push_back( - restriction_parser.TryParse(scripting_environment.getLuaState(), - static_cast(*entity))); + restriction_parser.TryParse(static_cast(*entity))); break; default: ++number_of_others; diff --git a/Extractor/RestrictionParser.cpp b/Extractor/RestrictionParser.cpp index 4ed2b4a82..2f122c851 100644 --- a/Extractor/RestrictionParser.cpp +++ b/Extractor/RestrictionParser.cpp @@ -39,13 +39,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#include - namespace { -int lua_error_callback(lua_State *L) +int lua_error_callback(lua_State *lua_state) { - luabind::object error_msg(luabind::from_stack(L, -1)); + luabind::object error_msg(luabind::from_stack(lua_state, -1)); std::ostringstream error_stream; error_stream << error_msg; throw OSRMException("ERROR occured in profile script:\n" + error_stream.str()); @@ -106,7 +104,7 @@ void RestrictionParser::ReadRestrictionExceptions(lua_State *lua_state) } mapbox::util::optional -RestrictionParser::TryParse(lua_State *lua_state, osmium::Relation &relation) const +RestrictionParser::TryParse(osmium::Relation &relation) const { // return if turn restrictions should be ignored if (!use_turn_restrictions) diff --git a/Extractor/RestrictionParser.h b/Extractor/RestrictionParser.h index ddf838f4b..197484db9 100644 --- a/Extractor/RestrictionParser.h +++ b/Extractor/RestrictionParser.h @@ -46,8 +46,7 @@ class RestrictionParser public: // RestrictionParser(ScriptingEnvironment &scripting_environment); RestrictionParser(lua_State *lua_state); - mapbox::util::optional TryParse(lua_State *lua_state, - osmium::Relation &relation) const; + mapbox::util::optional TryParse(osmium::Relation &relation) const; private: void ReadUseRestrictionsSetting(lua_State *lua_state);