X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/97e2219ed6c0e511f6165460cec79afadf42f589..ab71da4cf3e28f55f7aef47f5299519135429872:/src/surf/disk_s19.cpp diff --git a/src/surf/disk_s19.cpp b/src/surf/disk_s19.cpp index e638f1fc58..a6f894faa7 100644 --- a/src/surf/disk_s19.cpp +++ b/src/surf/disk_s19.cpp @@ -27,9 +27,7 @@ void surf_disk_model_init_default() engine->get_netzone_root()->set_disk_model(disk_model); } -namespace simgrid { -namespace kernel { -namespace resource { +namespace simgrid::kernel::resource { DiskImpl* DiskS19Model::create_disk(const std::string& name, double read_bandwidth, double write_bandwidth) { @@ -65,8 +63,7 @@ DiskAction* DiskS19Model::io_start(const DiskImpl* disk, sg_size_t size, s4u::Io default: THROW_UNIMPLEMENTED; } - const auto& factor_cb = disk->get_factor_cb(); - if (factor_cb) { // handling disk variability + if (const auto& factor_cb = disk->get_factor_cb()) { // handling disk variability action->set_rate_factor(factor_cb(size, type)); } return action; @@ -135,6 +132,4 @@ void DiskS19Action::update_remains_lazy(double /*now*/) { THROW_IMPOSSIBLE; } -} // namespace resource -} // namespace kernel -} // namespace simgrid +} // namespace simgrid::kernel::resource