X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9a9302e741ebc4b518302371273060cf18793917..2738598c9f876339ee6f8b3fc217984b7b837539:/src/instr/instr_paje_types.hpp diff --git a/src/instr/instr_paje_types.hpp b/src/instr/instr_paje_types.hpp index 9f0ad69326..0c9c66834c 100644 --- a/src/instr/instr_paje_types.hpp +++ b/src/instr/instr_paje_types.hpp @@ -7,6 +7,7 @@ #define INSTR_PAJE_TYPES_HPP #include "src/instr/instr_private.hpp" +#include #include #include #include @@ -23,12 +24,12 @@ class Type { Type* father_; public: - std::map children_; + std::map> children_; Container* issuer_ = nullptr; std::stringstream stream_; Type(const std::string& name, const std::string& alias, const std::string& color, Type* father); - virtual ~Type(); + virtual ~Type() = default; const std::string& get_name() const { return name_; } const char* get_cname() { return name_.c_str(); } @@ -42,7 +43,7 @@ public: template T* by_name_or_create(const std::string& name) { auto cont = children_.find(name); - return cont == children_.end() ? new T(name, this) : static_cast(cont->second); + return cont == children_.end() ? new T(name, this) : static_cast(cont->second.get()); } void set_calling_container(Container* container) { issuer_ = container; }