We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7a088d commit 5b6e82fCopy full SHA for 5b6e82f
src/extractor/scripting_environment_lua.cpp
@@ -259,11 +259,7 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
259
"version",
260
&osmium::Way::version,
261
"get_nodes",
262
- [&context](const osmium::Way &way) {
263
- sol::table nodes(context.state, sol::create);
264
- for(const osmium::NodeRef& nr : way.nodes()){ nodes.add(nr); }
265
- return nodes;
266
- },
+ [](const osmium::Way &way) { return sol::as_table(&way.nodes()); },
267
"get_location_tag",
268
[&context, &get_location_tag](const osmium::Way &way, const char *key) {
269
// HEURISTIC: use a single node (last) of the way to localize the way
0 commit comments