Skip to content

Commit

Permalink
fixed ordered pool not correctly copied or moved
Browse files Browse the repository at this point in the history
  • Loading branch information
IS4Code committed Dec 21, 2019
1 parent b9d6c85 commit 94e0ee5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/src/utils/block_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -523,12 +523,12 @@ namespace aux

}

block_pool(const block_pool &obj) : data(obj.data), block(std::make_unique<block_info>(*obj.block))
block_pool(const block_pool &obj) : data(obj.data), block(std::make_unique<block_info>(*obj.block)), level(obj.level), last_set(obj.last_set)
{

}

block_pool(block_pool &&obj) : data(std::move(obj.data)), block(std::move(obj.block))
block_pool(block_pool &&obj) : data(std::move(obj.data)), block(std::move(obj.block)), level(obj.level), last_set(obj.last_set)
{
obj.data.clear();
}
Expand All @@ -539,6 +539,8 @@ namespace aux
{
data = obj.data;
block = std::make_unique<block_info>(*obj.block);
level = obj.level;
last_set = obj.last_set;
}
return *this;
}
Expand All @@ -550,6 +552,8 @@ namespace aux
data = std::move(obj.data);
block = std::move(obj.block);
obj.data.clear();
level = obj.level;
last_set = obj.last_set;
}
return *this;
}
Expand Down

0 comments on commit 94e0ee5

Please sign in to comment.