minor changes

This commit is contained in:
Michele Caini
2019-07-06 16:29:09 +02:00
parent 99411241f6
commit d63b78f0e7
2 changed files with 3 additions and 10 deletions

View File

@@ -817,9 +817,7 @@ public:
auto next = copy[curr];
while(curr != next) {
const auto lhs = copy[curr];
const auto rhs = copy[next];
(std::get<pool_type<Owned> *>(pools)->swap(lhs, rhs), ...);
(std::get<pool_type<Owned> *>(pools)->swap(copy[curr], copy[next]), ...);
copy[curr] = curr;
curr = next;
next = copy[curr];

View File

@@ -459,10 +459,7 @@ public:
auto next = copy[curr];
while(curr != next) {
const auto lhs = copy[curr];
const auto rhs = copy[next];
std::swap(instances[lhs], instances[rhs]);
underlying_type::swap(lhs, rhs);
swap(copy[curr], copy[next]);
copy[curr] = curr;
curr = next;
next = copy[curr];
@@ -504,9 +501,7 @@ public:
if(underlying_type::has(curr)) {
if(curr != *(local + pos)) {
auto candidate = underlying_type::get(curr);
std::swap(instances[pos], instances[candidate]);
underlying_type::swap(pos, candidate);
swap(pos, underlying_type::get(curr));
}
--pos;