Revert "Copy nodes to lua table"

This reverts commit a7a088d416.
This commit is contained in:
Desone Burns II 2020-11-19 17:14:38 -07:00
parent a7a088d416
commit 5b6e82fa9c

View File

@ -259,11 +259,7 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
"version",
&osmium::Way::version,
"get_nodes",
[&context](const osmium::Way &way) {
sol::table nodes(context.state, sol::create);
for(const osmium::NodeRef& nr : way.nodes()){ nodes.add(nr); }
return nodes;
},
[](const osmium::Way &way) { return sol::as_table(&way.nodes()); },
"get_location_tag",
[&context, &get_location_tag](const osmium::Way &way, const char *key) {
// HEURISTIC: use a single node (last) of the way to localize the way