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
Constify get_properties() and and remove simcalls.
[simgrid.git]
/
src
/
s4u
/
s4u_Storage.cpp
diff --git
a/src/s4u/s4u_Storage.cpp
b/src/s4u/s4u_Storage.cpp
index
0be7985
..
8de6680
100644
(file)
--- a/
src/s4u/s4u_Storage.cpp
+++ b/
src/s4u/s4u_Storage.cpp
@@
-41,12
+41,12
@@
const char* Storage::get_type()
return pimpl_->typeId_.c_str();
}
return pimpl_->typeId_.c_str();
}
-std::unordered_map<std::string, std::string>* Storage::get_properties()
+const std::unordered_map<std::string, std::string>* Storage::get_properties() const
{
{
- return
simix::simcall([this] { return pimpl_->get_properties(); }
);
+ return
pimpl_->get_properties(
);
}
}
-const char* Storage::get_property(const std::string& key)
+const char* Storage::get_property(const std::string& key)
const
{
return this->pimpl_->get_property(key);
}
{
return this->pimpl_->get_property(key);
}
@@
-118,7
+118,7
@@
xbt_dict_t sg_storage_get_properties(sg_storage_t storage)
{
xbt_assert((storage != nullptr), "Invalid parameters (storage is nullptr)");
xbt_dict_t as_dict = xbt_dict_new_homogeneous(xbt_free_f);
{
xbt_assert((storage != nullptr), "Invalid parameters (storage is nullptr)");
xbt_dict_t as_dict = xbt_dict_new_homogeneous(xbt_free_f);
- std::unordered_map<std::string, std::string>* props = storage->get_properties();
+
const
std::unordered_map<std::string, std::string>* props = storage->get_properties();
if (props == nullptr)
return nullptr;
for (auto const& elm : *props) {
if (props == nullptr)
return nullptr;
for (auto const& elm : *props) {