Skip to content

Commit 0f99b0d

Browse files
committed
Remove intermediate lambda
1 parent a12c625 commit 0f99b0d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ompybind11/ompybind11.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ double calc_pi(int n) {
3838
};
3939

4040
PYBIND11_MODULE(ompybind11, m) {
41-
m.def("eval_func", &eval_func, py::arg("rank"), py::arg("function"),
41+
m.def("eval_func", &eval_func), py::arg("rank"), py::arg("function"),
4242
py::arg("x"))
43-
.def("calc_pi", [](int n) {
44-
return calc_pi(n);
45-
});
43+
.def("calc_pi", &calc_pi);
4644
}

0 commit comments

Comments
 (0)