A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add new entry in Release_Notes.
[simgrid.git]
/
src
/
xbt
/
PropertyHolder.cpp
diff --git
a/src/xbt/PropertyHolder.cpp
b/src/xbt/PropertyHolder.cpp
index
cc5a7b4
..
945d4c9
100644
(file)
--- a/
src/xbt/PropertyHolder.cpp
+++ b/
src/xbt/PropertyHolder.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2015-202
0
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2015-202
3
. 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. */
/* 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 <map>
#include <memory>
#include <map>
#include <memory>
-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
/** @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,17
+40,16
@@
template <class Assoc> void PropertyHolder::set_properties(const Assoc& properti
{
if (not properties_)
properties_ = std::make_unique<std::unordered_map<std::string, std::string>>();
{
if (not properties_)
properties_ = std::make_unique<std::unordered_map<std::string, std::string>>();
- std::unordered_map<std::string, std::string> props(
properties.cbegin(), properties.cend(
));
+ std::unordered_map<std::string, std::string> props(
std::cbegin(properties), std::cend(properties
));
#if __cplusplus >= 201703L
#if __cplusplus >= 201703L
- props.merge(properties_);
+ props.merge(
*
properties_);
#else
props.insert(properties_->cbegin(), properties_->cend());
#endif
properties_->swap(props);
}
#else
props.insert(properties_->cbegin(), properties_->cend());
#endif
properties_->swap(props);
}
-template void PropertyHolder::set_properties(const std::map<std::string, std::string>& properties);
+template void PropertyHolder::set_properties(const std::map<std::string, std::string
, std::less<>
>& properties);
template void PropertyHolder::set_properties(const std::unordered_map<std::string, std::string>& properties);
template void PropertyHolder::set_properties(const std::unordered_map<std::string, std::string>& properties);
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt