X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e3b2f1d55a07271c05db2ed5b3fec27561097f9..ebc355d0c96552d0bc2aa301d90723490337bca3:/src/s4u/s4u_Storage.cpp diff --git a/src/s4u/s4u_Storage.cpp b/src/s4u/s4u_Storage.cpp index 78cfaf6c44..09fb1063bc 100644 --- a/src/s4u/s4u_Storage.cpp +++ b/src/s4u/s4u_Storage.cpp @@ -13,17 +13,17 @@ namespace simgrid { namespace xbt { template class Extendable; -} +} // namespace xbt namespace s4u { -simgrid::xbt::signal Storage::on_creation; -simgrid::xbt::signal Storage::on_destruction; -simgrid::xbt::signal Storage::on_state_change; +xbt::signal Storage::on_creation; +xbt::signal Storage::on_destruction; +xbt::signal Storage::on_state_change; -Storage::Storage(std::string name, surf::StorageImpl* pimpl) : pimpl_(pimpl), name_(std::move(name)) +Storage::Storage(const std::string& name, kernel::resource::StorageImpl* pimpl) : pimpl_(pimpl), name_(name) { - simgrid::s4u::Engine::get_instance()->storage_register(name_, this); + Engine::get_instance()->storage_register(name_, this); } Storage* Storage::by_name(const std::string& name) @@ -51,9 +51,9 @@ const char* Storage::get_property(const std::string& key) return this->pimpl_->get_property(key); } -void Storage::set_property(const std::string& key, std::string value) +void Storage::set_property(const std::string& key, const std::string& value) { - simgrid::simix::simcall([this, key, value] { this->pimpl_->set_property(key, value); }); + simgrid::simix::simcall([this, &key, &value] { this->pimpl_->set_property(key, value); }); } IoPtr Storage::io_init(sg_size_t size, Io::OpType type) @@ -82,8 +82,8 @@ sg_size_t Storage::write(sg_size_t size) return IoPtr(io_init(size, Io::OpType::WRITE))->start()->wait()->get_performed_ioops(); } -} /* namespace s4u */ -} /* namespace simgrid */ +} // namespace s4u +} // namespace simgrid /* **************************** Public C interface *************************** */