Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Use template parameter.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 20 Oct 2020 19:10:06 +0000 (21:10 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 20 Oct 2020 19:10:19 +0000 (21:10 +0200)
src/mc/Session.cpp

index e25e431..d29fbeb 100644 (file)
@@ -27,7 +27,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_Session, mc, "Model-checker session");
 namespace simgrid {
 namespace mc {
 
-static void run_child_process(int socket, const std::function<void()>& code)
+template <class Code> void run_child_process(int socket, Code code)
 {
   /* On startup, simix_global_init() calls simgrid::mc::Client::initialize(), which checks whether the MC_ENV_SOCKET_FD
    * env variable is set. If so, MC mode is assumed, and the client is setup from its side