reformat RestrictionParser
This commit is contained in:
parent
9a0581ea7f
commit
cbfbcdcff5
@ -41,7 +41,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
namespace {
|
namespace
|
||||||
|
{
|
||||||
int lua_error_callback(lua_State *L)
|
int lua_error_callback(lua_State *L)
|
||||||
{
|
{
|
||||||
luabind::object error_msg(luabind::from_stack(L, -1));
|
luabind::object error_msg(luabind::from_stack(L, -1));
|
||||||
@ -104,7 +105,8 @@ void RestrictionParser::ReadRestrictionExceptions(lua_State *lua_state)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mapbox::util::optional<InputRestrictionContainer> RestrictionParser::TryParse(lua_State *lua_state, osmium::Relation &relation) const
|
mapbox::util::optional<InputRestrictionContainer>
|
||||||
|
RestrictionParser::TryParse(lua_State *lua_state, osmium::Relation &relation) const
|
||||||
{
|
{
|
||||||
// return if turn restrictions should be ignored
|
// return if turn restrictions should be ignored
|
||||||
if (!use_turn_restrictions)
|
if (!use_turn_restrictions)
|
||||||
@ -210,7 +212,8 @@ mapbox::util::optional<InputRestrictionContainer> RestrictionParser::TryParse(lu
|
|||||||
// SimpleLogger().Write() << (restriction_container.restriction.flags.is_only ? "only" : "no")
|
// SimpleLogger().Write() << (restriction_container.restriction.flags.is_only ? "only" : "no")
|
||||||
// << "-restriction "
|
// << "-restriction "
|
||||||
// << "<" << restriction_container.restriction.from.node << "->"
|
// << "<" << restriction_container.restriction.from.node << "->"
|
||||||
// << restriction_container.restriction.via.node << "->" << restriction_container.restriction.to.node
|
// << restriction_container.restriction.via.node << "->" <<
|
||||||
|
// restriction_container.restriction.to.node
|
||||||
// << ">";
|
// << ">";
|
||||||
|
|
||||||
return mapbox::util::optional<InputRestrictionContainer>(restriction_container);
|
return mapbox::util::optional<InputRestrictionContainer>(restriction_container);
|
||||||
|
@ -46,7 +46,8 @@ class RestrictionParser
|
|||||||
public:
|
public:
|
||||||
// RestrictionParser(ScriptingEnvironment &scripting_environment);
|
// RestrictionParser(ScriptingEnvironment &scripting_environment);
|
||||||
RestrictionParser(lua_State *lua_state);
|
RestrictionParser(lua_State *lua_state);
|
||||||
mapbox::util::optional<InputRestrictionContainer> TryParse(lua_State *lua_state, osmium::Relation& relation) const;
|
mapbox::util::optional<InputRestrictionContainer> TryParse(lua_State *lua_state,
|
||||||
|
osmium::Relation &relation) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ReadUseRestrictionsSetting(lua_State *lua_state);
|
void ReadUseRestrictionsSetting(lua_State *lua_state);
|
||||||
|
Loading…
Reference in New Issue
Block a user