X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/84402e8e2ee2a2d0bef25fdceb0a263ed8b471f6..abde25848321a069d7eef47a55a77ff80a3aa91f:/src/xbt/PropertyHolder.cpp diff --git a/src/xbt/PropertyHolder.cpp b/src/xbt/PropertyHolder.cpp index 92f2ff88ad..cc5a7b4b77 100644 --- a/src/xbt/PropertyHolder.cpp +++ b/src/xbt/PropertyHolder.cpp @@ -6,6 +6,7 @@ #include #include +#include namespace simgrid { namespace xbt { @@ -23,7 +24,7 @@ const char* PropertyHolder::get_property(const std::string& key) const void PropertyHolder::set_property(const std::string& key, const std::string& value) { if (not properties_) - properties_.reset(new std::unordered_map); + properties_ = std::make_unique>(); (*properties_)[key] = value; } @@ -31,7 +32,7 @@ void PropertyHolder::set_property(const std::string& key, const std::string& val const std::unordered_map* PropertyHolder::get_properties() { if (not properties_) - properties_.reset(new std::unordered_map); + properties_ = std::make_unique>(); return properties_.get(); } @@ -39,7 +40,7 @@ const std::unordered_map* PropertyHolder::get_properti template void PropertyHolder::set_properties(const Assoc& properties) { if (not properties_) - properties_.reset(new std::unordered_map); + properties_ = std::make_unique>(); std::unordered_map props(properties.cbegin(), properties.cend()); #if __cplusplus >= 201703L props.merge(properties_);