/* - Display Host properties */
for (auto h : e.get_all_hosts()) {
XBT_INFO("*** %s properties ****", h->get_cname());
- for (auto kv : *h->get_properties())
+ for (auto const& kv : *h->get_properties())
XBT_INFO(" %s -> %s", kv.first.c_str(), kv.second.c_str());
}
static void producer(const std::vector<std::string>* args)
{
- for (auto str : *args) {
+ for (auto const& str : *args) {
sem_empty->acquire();
XBT_INFO("Pushing '%s'", str.c_str());
buffer = str.c_str();
tracing_file << "#This file was generated using SimGrid-" << SIMGRID_VERSION_MAJOR << "." << SIMGRID_VERSION_MINOR
<< "." << SIMGRID_VERSION_PATCH << std::endl;
tracing_file << "#[";
- for (auto str : simgrid::xbt::cmdline) {
+ for (auto const& str : simgrid::xbt::cmdline) {
tracing_file << str << " ";
}
tracing_file << "]" << std::endl;
std::map<std::string, xbt_edge_t> edges;
netzone->get_impl()->get_graph(graph, &nodes, &edges);
- for (auto elm : edges) {
+ for (auto const& elm : edges) {
const xbt_edge* edge = elm.second;
linkContainers(simgrid::instr::Container::by_name(static_cast<const char*>(edge->src->data)),
simgrid::instr::Container::by_name(static_cast<const char*>(edge->dst->data)), filter);
int nSTA = get_host_count();
std::vector<Metric> new_bandwidths;
- for (auto bandwidth : bandwidths_){
+ for (auto const& bandwidth : bandwidths_) {
// Instantiate decay model relatively to the actual bandwidth
double max_bw=bandwidth.peak;
double min_bw=bandwidth.peak-(wifi_max_rate_-wifi_min_rate_);
std::vector<double> bandwidths;
std::vector<std::string> tokens;
boost::split(tokens, string, boost::is_any_of(";,"));
- for (auto token : tokens) {
+ for (auto const& token : tokens) {
bandwidths.push_back(surf_parse_get_value_with_unit(
filename, lineno, token.c_str(), units, entity_kind, name,
"Append 'Bps' to get bytes per second (or 'bps' for bits but 1Bps = 8bps)", "Bps"));