Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove useless new/delete (please sonar).
[simgrid.git] / src / surf / HostImpl.hpp
index 6e3404f..08ae367 100644 (file)
@@ -40,7 +40,7 @@ public:
  ************/
 /** @ingroup SURF_host_interface
  * @brief SURF Host interface class
- * @details An host represents a machine with a aggregation of a Cpu, a RoutingEdge and a Storage
+ * @details A host represents a machine with an aggregation of a Cpu, a RoutingEdge and a Storage
  */
 class XBT_PRIVATE HostImpl : public xbt::PropertyHolder {
   std::vector<kernel::actor::ProcessArg*> actors_at_boot_;
@@ -63,7 +63,7 @@ public:
   std::unordered_map<std::string, s4u::Storage*>* get_mounted_storages();
   void set_storages(const std::map<std::string, kernel::resource::StorageImpl*>& storages) { storage_ = storages; }
 
-  s4u::Host* get_iface() { return piface_; }
+  s4u::Host* get_iface() const { return piface_; }
 
   void turn_on() const;
   void turn_off(const kernel::actor::ActorImpl* issuer);
@@ -73,11 +73,10 @@ public:
   void remove_actor(kernel::actor::ActorImpl* actor) { xbt::intrusive_erase(actor_list_, *actor); }
   void add_actor_at_boot(kernel::actor::ProcessArg* arg) { actors_at_boot_.emplace_back(arg); }
 
-  typedef boost::intrusive::list<
+  using ActorList = boost::intrusive::list<
       kernel::actor::ActorImpl,
       boost::intrusive::member_hook<kernel::actor::ActorImpl, boost::intrusive::list_member_hook<>,
-                                    &kernel::actor::ActorImpl::host_actor_list_hook>>
-      ActorList;
+                                    &kernel::actor::ActorImpl::host_actor_list_hook>>;
 
   // FIXME: make these private
   ActorList actor_list_;