Skip to content

Commit 03bebdc

Browse files
committed
Remove the lambda wrapping of make_visibility_collector
It was only necessary because of a bug the pull request (pybind/pybind11#805).
1 parent e1d8842 commit 03bebdc

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

katsdpimager/preprocess.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ visibility_collector<P>::visibility_collector(
606606
// Factory for a visibility collector with *up to* P polarizations
607607
template<int P>
608608
static std::unique_ptr<visibility_collector_base>
609-
make_visibility_collector_impl(
609+
make_visibility_collector(
610610
int polarizations,
611611
py::array_t<channel_config, array_flags> config,
612612
std::function<void(py::array)> emit_callback,
@@ -623,7 +623,7 @@ make_visibility_collector_impl(
623623
else
624624
// The special case for P=1 prevents an infinite template recursion.
625625
// When P=1, this code is unreachable.
626-
return make_visibility_collector_impl<P == 1 ? 1 : P - 1>(
626+
return make_visibility_collector<P == 1 ? 1 : P - 1>(
627627
polarizations, std::move(config),
628628
std::move(emit_callback), buffer_capacity);
629629
}
@@ -643,13 +643,7 @@ PYBIND11_PLUGIN(_preprocess)
643643

644644
module m("_preprocess", "C++ backend of visibility preprocessing");
645645
class_<visibility_collector_base>(m, "VisibilityCollector")
646-
.def(init([](int polarizations,
647-
py::array_t<channel_config, array_flags> config,
648-
std::function<void(py::array)> emit_callback,
649-
std::size_t buffer_capacity) {
650-
return make_visibility_collector_impl<4>(
651-
polarizations, std::move(config), std::move(emit_callback), buffer_capacity);
652-
}))
646+
.def(init(&make_visibility_collector<4>))
653647
.def("add", &visibility_collector_base::add)
654648
.def("close", &visibility_collector_base::close)
655649
.def_readonly("num_input", &visibility_collector_base::num_input)

0 commit comments

Comments
 (0)