X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/08e7455d67920bbd7a87f440d00f2c1e071314a0..00f2021a5b4cf37f52dab7839d0d29505a60e673:/src/xbt/PropertyHolder.cpp diff --git a/src/xbt/PropertyHolder.cpp b/src/xbt/PropertyHolder.cpp index 00ca79751b..945d4c9946 100644 --- a/src/xbt/PropertyHolder.cpp +++ b/src/xbt/PropertyHolder.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2015-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -8,8 +8,7 @@ #include #include -namespace simgrid { -namespace xbt { +namespace simgrid::xbt { /** @brief Return the property associated to the provided key (or nullptr if not existing) */ const char* PropertyHolder::get_property(const std::string& key) const @@ -41,9 +40,9 @@ template void PropertyHolder::set_properties(const Assoc& properti { if (not properties_) properties_ = std::make_unique>(); - std::unordered_map props(properties.cbegin(), properties.cend()); + std::unordered_map props(std::cbegin(properties), std::cend(properties)); #if __cplusplus >= 201703L - props.merge(properties_); + props.merge(*properties_); #else props.insert(properties_->cbegin(), properties_->cend()); #endif @@ -53,5 +52,4 @@ template void PropertyHolder::set_properties(const Assoc& properti template void PropertyHolder::set_properties(const std::map>& properties); template void PropertyHolder::set_properties(const std::unordered_map& properties); -} // namespace xbt -} // namespace simgrid +} // namespace simgrid::xbt