Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sonar
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 12 Aug 2017 20:14:34 +0000 (22:14 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 12 Aug 2017 20:14:34 +0000 (22:14 +0200)
src/simix/smx_global.cpp
src/surf/surf_interface.hpp

index 0e69735..89f0c53 100644 (file)
@@ -54,11 +54,12 @@ std::unique_ptr<simgrid::simix::Global> simix_global;
 static xbt_heap_t simix_timers = nullptr;
 
 /** @brief Timer datatype */
-typedef struct s_smx_timer {
+typedef class s_smx_timer {
+public:
   double date = 0.0;
+  s_smx_timer() = default;
   simgrid::xbt::Task<void()> callback;
 
-  s_smx_timer()=default;
   s_smx_timer(double date, simgrid::xbt::Task<void()> callback) : date(date), callback(std::move(callback)) {}
 } s_smx_timer_t;
 
index f465a21..0c39619 100644 (file)
@@ -412,13 +412,9 @@ protected:
 }
 
 namespace std {
-  template <>
-  struct hash<simgrid::surf::Resource>
-  {
-    std::size_t operator()(const simgrid::surf::Resource& r) const
-    {
-      return (std::size_t) xbt_str_hash(r.cname());
-    }
+template <> class hash<simgrid::surf::Resource> {
+public:
+  std::size_t operator()(const simgrid::surf::Resource& r) const { return (std::size_t)xbt_str_hash(r.cname()); }
   };
 }