Skip to content

Commit acb4947

Browse files
committed
Optimize convert_polygon_vector a bit
1 parent 22471b1 commit acb4947

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_path_wrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ convert_polygon_vector(std::vector<Polygon> &polygons)
2525
auto result = py::list(polygons.size());
2626

2727
for (size_t i = 0; i < polygons.size(); ++i) {
28-
Polygon poly = polygons[i];
28+
const auto& poly = polygons[i];
2929
py::ssize_t dims[] = { static_cast<py::ssize_t>(poly.size()), 2 };
3030
result[i] = py::array(dims, reinterpret_cast<double*>(poly.data()));
3131
}

0 commit comments

Comments
 (0)