Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ahem
[simgrid.git] / src / mc / ChunkedData.hpp
index 076e607..a739fea 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2014-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2014-2017. 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. */
@@ -35,7 +34,7 @@ class ChunkedData {
   std::vector<std::size_t> pagenos_;
 public:
 
-  ChunkedData() {}
+  ChunkedData() = default;
   void clear()
   {
     for (std::size_t pageno : pagenos_)
@@ -49,17 +48,17 @@ public:
 
   // Copy and move
   ChunkedData(ChunkedData const& that)
+     : store_ (that.store_)
+     , pagenos_(that.pagenos_)
   {
-    store_ = that.store_;
-    pagenos_ = that.pagenos_;
     for (std::size_t pageno : pagenos_)
       store_->ref_page(pageno);
   }
   ChunkedData(ChunkedData&& that)
+     : store_(that.store_)
+     , pagenos_(std::move(that.pagenos_))
   {
-    store_ = that.store_;
     that.store_ = nullptr;
-    pagenos_ = std::move(that.pagenos_);
     that.pagenos_.clear();
   }
   ChunkedData& operator=(ChunkedData const& that)