Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use const& for the parameters of type std::string not affected by previous commit.
[simgrid.git] / src / bindings / python / simgrid_python.cpp
index 1469120..eb74563 100644 (file)
@@ -116,7 +116,7 @@ PYBIND11_MODULE(simgrid, m)
            ":cpp:func:`simgrid::s4u::Engine::load_deployment()`")
       .def("run", &Engine::run, "Run the simulation")
       .def("register_actor",
-           [pyStopRequestEx](Engine*, std::string name, py::object fun_or_class) {
+           [pyStopRequestEx](Engine*, const std::string& name, py::object fun_or_class) {
              simgrid::simix::register_function(
                  name, [pyStopRequestEx, fun_or_class](std::vector<std::string> args) -> simgrid::simix::ActorCode {
                    return [pyStopRequestEx, fun_or_class, args]() {