myHost(const char*procname, simgrid::s4u::Host *host,int argc, char **argv)
: simgrid::s4u::Actor(procname,host,argc,argv){}
- void show_info(boost::unordered_map <std::string, simgrid::s4u::Storage*> &mounts) {
+ void show_info(boost::unordered_map <std::string, simgrid::s4u::Storage*> const&mounts) {
XBT_INFO("Storage info on %s:",
simgrid::s4u::Host::current()->name().c_str());
}
int main(int argc, char **argv) {
- boost::unordered_map <std::string, simgrid::s4u::Storage *>& mounts =
+ boost::unordered_map <std::string, simgrid::s4u::Storage *> const& mounts =
simgrid::s4u::Host::current()->mounted_storages();
show_info(mounts);
/** Get an associative list [mount point]->[Storage] off all local mount points.
*
* This is defined in the platform file, and cannot be modified programatically (yet).
- *
- * Do not change the returned value in any way.
*/
- boost::unordered_map<std::string, Storage*> &mounted_storages();
+ boost::unordered_map<std::string, Storage*> const &mounted_storages();
private:
simgrid::xbt::string name_ = "noname";
return this->pimpl_cpu->getNbPStates();
}
-boost::unordered_map<std::string, Storage*> &Host::mounted_storages() {
+boost::unordered_map<std::string, Storage*> const& Host::mounted_storages() {
if (mounts == NULL) {
mounts = new boost::unordered_map<std::string, Storage*> ();