Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make parameters pointer/reference-to-const (sonar).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 25 Aug 2022 09:29:58 +0000 (11:29 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 25 Aug 2022 09:30:06 +0000 (11:30 +0200)
src/mc/api/State.cpp
src/mc/api/State.hpp
src/mc/explo/CommunicationDeterminismChecker.cpp

index 5ca3182..777ca4d 100644 (file)
@@ -14,7 +14,7 @@ namespace simgrid::mc {
 
 long State::expended_states_ = 0;
 
-State::State(RemoteApp& remote_app) : num_(++expended_states_)
+State::State(const RemoteApp& remote_app) : num_(++expended_states_)
 {
   remote_app.get_actors_status(actors_to_run_);
 
index 1e90603..31ce756 100644 (file)
@@ -30,7 +30,7 @@ class XBT_PRIVATE State : public xbt::Extendable<State> {
   std::shared_ptr<Snapshot> system_state_;
 
 public:
-  explicit State(RemoteApp& remote_app);
+  explicit State(const RemoteApp& remote_app);
 
   /* Returns a positive number if there is another transition to pick, or -1 if not */
   aid_t next_transition() const;
index ad0677a..bb9a5b2 100644 (file)
@@ -339,7 +339,7 @@ Exploration* create_communication_determinism_checker(const std::vector<char*>&
     state->extension_set(new StateCommDet(*extension, remote_app));
   });
 
-  DFSExplorer::on_restore_system_state([extension](State* state, RemoteApp const& remote_app) {
+  DFSExplorer::on_restore_system_state([extension](State const* state, RemoteApp const& remote_app) {
     extension->restore_communications_pattern(state, remote_app);
   });
 
@@ -354,9 +354,9 @@ Exploration* create_communication_determinism_checker(const std::vector<char*>&
   });
 
   DFSExplorer::on_transition_replay(
-      [extension](Transition* t, RemoteApp const&) { extension->handle_comm_pattern(t); });
+      [extension](Transition const* t, RemoteApp const&) { extension->handle_comm_pattern(t); });
   DFSExplorer::on_transition_execute(
-      [extension](Transition* t, RemoteApp const&) { extension->handle_comm_pattern(t); });
+      [extension](Transition const* t, RemoteApp const&) { extension->handle_comm_pattern(t); });
 
   DFSExplorer::on_log_state([extension](RemoteApp const&) {
     if (_sg_mc_comms_determinism) {