Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into clean_events
[simgrid.git] / src / smpi / smpi_keyvals.hpp
index c302a55..bc3e2af 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2010, 2013-2017. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -7,9 +6,10 @@
 #ifndef SMPI_KEYVALS_HPP_INCLUDED
 #define SMPI_KEYVALS_HPP_INCLUDED
 
-#include "private.h"
+#include "smpi/smpi.h"
+#include "xbt/ex.hpp"
+
 #include <unordered_map>
-#include <xbt/ex.hpp>
 
 typedef struct smpi_delete_fn{
   MPI_Comm_delete_attr_function          *comm_delete_fn;
@@ -27,7 +27,7 @@ typedef struct s_smpi_key_elem {
   smpi_copy_fn copy_fn;
   smpi_delete_fn delete_fn;
   int refcount;
-} s_smpi_mpi_key_elem_t; 
+} s_smpi_mpi_key_elem_t;
 
 typedef struct s_smpi_key_elem *smpi_key_elem;
 
@@ -40,7 +40,7 @@ class Keyval{
   protected:
     std::unordered_map<int, void*>* attributes();
   public:
-// Each subclass should have two members, as we want to separate the ones for Win, Comm, and Datatypes :  
+// Each subclass should have two members, as we want to separate the ones for Win, Comm, and Datatypes :
 //    static std::unordered_map<int, smpi_key_elem> keyvals_;
 //    static int keyval_id_;
     template <typename T> static int keyval_create(smpi_copy_fn copy_fn, smpi_delete_fn delete_fn, int* keyval, void* extra_statee);
@@ -137,7 +137,7 @@ template <typename T> int Keyval::attr_put(int keyval, void* attr_value){
 }
 
 template <typename T> void Keyval::cleanup_attr(){
-  if(!attributes()->empty()){
+  if (not attributes()->empty()) {
     int flag=0;
     for(auto it : attributes_){
       try{