Skip to content

Commit 201e743

Browse files
committed
correctly mark copy constructors
1 parent b1236a5 commit 201e743

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/common_edge_properties.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ template <typename EdgeT>
1414
nb::class_<EdgeT> define_basic_edge_concept(nb::module_& m) {
1515
nb::class_<EdgeT> cls(m, python_type_str<EdgeT>().c_str());
1616

17-
cls.def(nb::init<EdgeT>(),
17+
cls.def(nb::init<const EdgeT&>(),
1818
"edge"_a,
1919
nb::call_guard<nb::gil_scoped_release>())
2020
.def("mutated_verts",

src/implicit_event_graphs.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ struct declare_implicit_event_graph_class {
2121
using Net = reticula::implicit_event_graph<EdgeT, AdjT>;
2222
nb::class_<Net>(
2323
m, python_type_str<Net>().c_str())
24+
.def(nb::init<const Net&>(),
25+
nb::call_guard<nb::gil_scoped_release>())
2426
.def(nb::init<std::vector<EdgeT>, AdjT>(),
2527
"events"_a, "temporal_adjacency"_a,
2628
nb::call_guard<nb::gil_scoped_release>())

src/networks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct declare_network_class {
2121
nb::class_<Net>(m, python_type_str<Net>().c_str())
2222
.def(nb::init<>(),
2323
nb::call_guard<nb::gil_scoped_release>())
24-
.def(nb::init<reticula::network<EdgeT>>(),
24+
.def(nb::init<const Net&>(),
2525
"network"_a,
2626
nb::call_guard<nb::gil_scoped_release>())
2727
.def(nb::init<std::vector<EdgeT>>(),

src/temporal_clusters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct declare_temporal_cluster_types {
2323
.def(nb::init<AdjT, std::size_t>(),
2424
"temporal_adjacency"_a, "size_hint"_a = 0,
2525
nb::call_guard<nb::gil_scoped_release>())
26-
.def(nb::init<Cluster>(),
26+
.def(nb::init<const Cluster&>(),
2727
"temporal_cluester"_a,
2828
nb::call_guard<nb::gil_scoped_release>())
2929
.def(nb::init<std::vector<EdgeT>, AdjT, std::size_t>(),

0 commit comments

Comments
 (0)