Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Sonar: make overridden methods virtual.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 28 Oct 2017 16:56:12 +0000 (18:56 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 8 Nov 2017 16:36:21 +0000 (17:36 +0100)
src/smpi/include/smpi_comm.hpp
src/smpi/include/smpi_f2c.hpp
src/smpi/include/smpi_request.hpp

index ed621f1..86f00b2 100644 (file)
@@ -58,7 +58,7 @@ class Comm : public F2C, public Keyval{
     static void destroy(MPI_Comm comm);
     void init_smp();
 
     static void destroy(MPI_Comm comm);
     void init_smp();
 
-    int add_f();
+    int add_f() override;
     static void free_f(int id);
     static Comm* f2c(int);
 
     static void free_f(int id);
     static Comm* f2c(int);
 
index 207c699..03d8908 100644 (file)
@@ -33,10 +33,12 @@ class F2C {
     static void delete_lookup();
     static std::unordered_map<std::string, F2C*>* lookup();
 
     static void delete_lookup();
     static std::unordered_map<std::string, F2C*>* lookup();
 
+    virtual ~F2C() = default;
+
     //Override these to handle specific values.
     //Override these to handle specific values.
-    int add_f();
+    virtual int add_f();
     static void free_f(int id);
     static void free_f(int id);
-    int c2f();
+    virtual int c2f();
 
     // This method should be overridden in all subclasses to avoid casting the result when calling it.
     // For the default one, the MPI_*_NULL returned is assumed to be NULL.
 
     // This method should be overridden in all subclasses to avoid casting the result when calling it.
     // For the default one, the MPI_*_NULL returned is assumed to be NULL.
index 5a11b2d..f6c69ac 100644 (file)
@@ -91,7 +91,7 @@ class Request : public F2C {
     static int match_send(void* a, void* b, simgrid::kernel::activity::CommImpl* ignored);
     static int match_recv(void* a, void* b, simgrid::kernel::activity::CommImpl* ignored);
 
     static int match_send(void* a, void* b, simgrid::kernel::activity::CommImpl* ignored);
     static int match_recv(void* a, void* b, simgrid::kernel::activity::CommImpl* ignored);
 
-    int add_f();
+    int add_f() override;
     static void free_f(int id);
     static Request* f2c(int);
 
     static void free_f(int id);
     static Request* f2c(int);