Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Const/override for member functions.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 7 Apr 2021 12:54:52 +0000 (14:54 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 7 Apr 2021 13:44:30 +0000 (15:44 +0200)
src/smpi/include/smpi_actor.hpp
src/smpi/include/smpi_f2c.hpp
src/smpi/include/smpi_request.hpp

index 1b43f2c..dd1519d 100644 (file)
@@ -75,7 +75,7 @@ public:
   void simulated_start();
   double simulated_elapsed() const;
   MPI_Comm comm_world() const;
-  bool comm_self_is_set() {return (comm_self_ != MPI_COMM_NULL);};
+  bool comm_self_is_set() const { return (comm_self_ != MPI_COMM_NULL); };
   MPI_Comm comm_self();
   MPI_Comm comm_intra();
   void set_comm_intra(MPI_Comm comm);
index 856525b..1f70e9b 100644 (file)
@@ -35,7 +35,7 @@ protected:
     if (not f2c_lookup_)
       f2c_lookup_ = std::make_unique<f2c_lookup_type>();
   }
-  int f2c_id() { return my_f2c_id_; }
+  int f2c_id() const { return my_f2c_id_; }
   static int global_f2c_id() { return f2c_id_; }
   static void f2c_id_increment() { f2c_id_++; }
 
@@ -56,7 +56,7 @@ public:
   static F2C* f2c(int id);
   static void finish_initialization() { num_default_handles_ = f2c_lookup_->size(); }
   static f2c_lookup_type::size_type get_num_default_handles() { return num_default_handles_; }
-  std::string call_location(){ return call_location_; }
+  const std::string& call_location() const { return call_location_; }
 };
 
 }
index 9f2f864..939248b 100644 (file)
@@ -64,7 +64,7 @@ public:
   int tag() const { return tag_; }
   int flags() const { return flags_; }
   bool detached() const { return detached_; }
-  std::string name() const {return std::string("MPI_Request");}
+  std::string name() const override { return std::string("MPI_Request"); }
   MPI_Datatype type() const { return old_type_; }
   void print_request(const char* message) const;
   void start();