}
/* Apply the control */
- auto iset = std::find_if(begin(xbt_log_settings()), end(xbt_log_settings()),
- [category](const xbt_log_setting_t& s) { return s.catname == category->name; });
- if (iset != xbt_log_settings().end()) {
+ if (auto iset = std::find_if(begin(xbt_log_settings()), end(xbt_log_settings()),
+ [category](const xbt_log_setting_t& s) { return s.catname == category->name; });
+ iset != xbt_log_settings().end()) {
_xbt_log_cat_apply_set(category, *iset);
xbt_log_settings().erase(iset);
} else {
throw std::invalid_argument(simgrid::xbt::string_printf("Unknown appender log type: '%s'", value));
}
} else if (strncmp(option, "fmt", option_len) == 0) {
- set.fmt = std::string(value);
+ set.fmt = value;
} else {
xbt_die("Unknown setting of the log category: '%.*s'", static_cast<int>(option_len), option);
}