Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Engine is in charge of platform creation, not SIMIX anymore
[simgrid.git] / src / s4u / s4u_Storage.cpp
index 799240f..f0bd686 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2019. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -58,14 +58,11 @@ void Storage::set_property(std::string key, std::string value)
 
 IoPtr Storage::io_init(sg_size_t size, Io::OpType type)
 {
-  IoPtr res     = IoPtr(new Io(size, type));
-  res->storage_ = this;
-  return res;
+  return IoPtr(new Io(this, size, type));
 }
 
 IoPtr Storage::read_async(sg_size_t size)
 {
-
   IoPtr res = io_init(size, Io::OpType::READ);
   res->start();
   return res;