Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Prefer "using" to "typedef".
[simgrid.git] / include / simgrid / jedule / jedule_platform.hpp
index 9079e9e..a63279e 100644 (file)
@@ -30,9 +30,9 @@ public:
 
   const char* get_cname() const { return name.c_str(); }
   void set_parent(Container* parent) { parent_ = parent; }
-  bool has_children() { return not children_.empty(); }
+  bool has_children() const { return not children_.empty(); }
   int get_child_position(const Container* child) const;
-  unsigned int get_id_by_name(const char* name) { return name2id.at(name); }
+  unsigned int get_id_by_name(const char* name) const { return name2id.at(name); }
 
   void add_child(Container* child);
   void add_resources(std::vector<sg_host_t> hosts);
@@ -53,7 +53,7 @@ public:
 
 } // namespace jedule
 } // namespace simgrid
-typedef simgrid::jedule::Container * jed_container_t;
+using jed_container_t = simgrid::jedule::Container*;
 void get_resource_selection_by_hosts(std::vector<simgrid::jedule::Subset>& subset_list,
                                      const std::vector<sg_host_t>& host_list);