Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Fix more implicit casts that should not lower precision (S5276).
[simgrid.git] / src / bindings / python / simgrid_python.cpp
index 66b1c1f..f900c97 100644 (file)
@@ -152,7 +152,7 @@ PYBIND11_MODULE(simgrid, m)
   py::class_<Engine>(m, "Engine", "Simulation Engine")
       .def(py::init([](std::vector<std::string> args) {
         static char noarg[] = {'\0'};
-        int argc            = args.size();
+        int argc            = static_cast<int>(args.size());
         std::unique_ptr<char* []> argv(new char*[argc + 1]);
         for (int i = 0; i != argc; ++i)
           argv[i] = args[i].empty() ? noarg : &args[i].front();
@@ -199,7 +199,7 @@ PYBIND11_MODULE(simgrid, m)
   /* Class Host */
   py::class_<simgrid::s4u::Host, std::unique_ptr<Host, py::nodelete>>(m, "Host", "Simulated host")
       .def("by_name", &Host::by_name, "Retrieves a host from its name, or die")
-      .def("get_pstate_count", &Host::get_pstate_count, "Retrieve the cound of defined pstate levels")
+      .def("get_pstate_count", &Host::get_pstate_count, "Retrieve the count of defined pstate levels")
       .def("get_pstate_speed", &Host::get_pstate_speed, "Retrieve the maximal speed at the given pstate")
       .def_property(
           "pstate", &Host::get_pstate,