A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert MC config parameters to C++ API, and move their definitions to mc_config...
[simgrid.git]
/
src
/
mc
/
ChunkedData.hpp
diff --git
a/src/mc/ChunkedData.hpp
b/src/mc/ChunkedData.hpp
index
330f2c9
..
52b56c9
100644
(file)
--- a/
src/mc/ChunkedData.hpp
+++ b/
src/mc/ChunkedData.hpp
@@
-1,5
+1,4
@@
-/* Copyright (c) 2014-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2014-2018. 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. */
/* 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. */
@@
-38,7
+37,7
@@
public:
ChunkedData() = default;
void clear()
{
ChunkedData() = default;
void clear()
{
- for (std::size_t pageno : pagenos_)
+ for (std::size_t
const&
pageno : pagenos_)
store_->unref_page(pageno);
pagenos_.clear();
}
store_->unref_page(pageno);
pagenos_.clear();
}
@@
-51,16
+50,15
@@
public:
ChunkedData(ChunkedData const& that)
: store_ (that.store_)
, pagenos_(that.pagenos_)
ChunkedData(ChunkedData const& that)
: store_ (that.store_)
, pagenos_(that.pagenos_)
-
{
{
- for (std::size_t pageno : pagenos_)
+ for (std::size_t
const&
pageno : pagenos_)
store_->ref_page(pageno);
}
ChunkedData(ChunkedData&& that)
store_->ref_page(pageno);
}
ChunkedData(ChunkedData&& that)
+ : store_(that.store_)
+ , pagenos_(std::move(that.pagenos_))
{
{
- store_ = that.store_;
that.store_ = nullptr;
that.store_ = nullptr;
- pagenos_ = std::move(that.pagenos_);
that.pagenos_.clear();
}
ChunkedData& operator=(ChunkedData const& that)
that.pagenos_.clear();
}
ChunkedData& operator=(ChunkedData const& that)
@@
-68,7
+66,7
@@
public:
this->clear();
store_ = that.store_;
pagenos_ = that.pagenos_;
this->clear();
store_ = that.store_;
pagenos_ = that.pagenos_;
- for (std::size_t pageno : pagenos_)
+ for (std::size_t
const&
pageno : pagenos_)
store_->ref_page(pageno);
return *this;
}
store_->ref_page(pageno);
return *this;
}