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
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git]
/
src
/
mc
/
sosp
/
ChunkedData.hpp
diff --git
a/src/mc/sosp/ChunkedData.hpp
b/src/mc/sosp/ChunkedData.hpp
index
2846455
..
c4a706f
100644
(file)
--- a/
src/mc/sosp/ChunkedData.hpp
+++ b/
src/mc/sosp/ChunkedData.hpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2014-202
1
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2014-202
3
. 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. */
@@
-12,8
+12,7
@@
#include "src/mc/remote/RemotePtr.hpp"
#include "src/mc/sosp/PageStore.hpp"
#include "src/mc/remote/RemotePtr.hpp"
#include "src/mc/sosp/PageStore.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** A byte-string represented as a sequence of chunks from a PageStore
*
/** A byte-string represented as a sequence of chunks from a PageStore
*
@@
-64,11
+63,13
@@
public:
}
ChunkedData& operator=(ChunkedData&& that) noexcept
{
}
ChunkedData& operator=(ChunkedData&& that) noexcept
{
- this->clear();
- store_ = that.store_;
- that.store_ = nullptr;
- pagenos_ = std::move(that.pagenos_);
- that.pagenos_.clear();
+ if (this != &that) {
+ this->clear();
+ store_ = that.store_;
+ that.store_ = nullptr;
+ pagenos_ = std::move(that.pagenos_);
+ that.pagenos_.clear();
+ }
return *this;
}
return *this;
}
@@
-87,7
+88,6
@@
public:
ChunkedData(PageStore& store, const AddressSpace& as, RemotePtr<void> addr, std::size_t page_count);
};
ChunkedData(PageStore& store, const AddressSpace& as, RemotePtr<void> addr, std::size_t page_count);
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#endif