Skip to content

Commit 5b6e82f

Browse files
committed
Revert "Copy nodes to lua table"
This reverts commit a7a088d.
1 parent a7a088d commit 5b6e82f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/extractor/scripting_environment_lua.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,7 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
259259
"version",
260260
&osmium::Way::version,
261261
"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-
},
262+
[](const osmium::Way &way) { return sol::as_table(&way.nodes()); },
267263
"get_location_tag",
268264
[&context, &get_location_tag](const osmium::Way &way, const char *key) {
269265
// HEURISTIC: use a single node (last) of the way to localize the way

0 commit comments

Comments
 (0)