Petit fix
This commit is contained in:
parent
3438519d3b
commit
33a92d4667
@ -22,6 +22,7 @@ GridTeamH::GridTeamH(GridTeamH const& cpy)
|
|||||||
: GridTeamH(cpy.width(), cpy.height(), CellType::alive)
|
: GridTeamH(cpy.width(), cpy.height(), CellType::alive)
|
||||||
{
|
{
|
||||||
mAliveCount = cpy.mAliveCount;
|
mAliveCount = cpy.mAliveCount;
|
||||||
|
mLastGenAliveCount = cpy.mLastGenAliveCount;
|
||||||
memcpy(mData, cpy.mData, cpy.size() * sizeof(CellType));
|
memcpy(mData, cpy.mData, cpy.size() * sizeof(CellType));
|
||||||
memcpy(mIntermediateData, cpy.mIntermediateData, cpy.size() * sizeof(CellType));
|
memcpy(mIntermediateData, cpy.mIntermediateData, cpy.size() * sizeof(CellType));
|
||||||
}
|
}
|
||||||
@ -41,6 +42,7 @@ GridTeamH& GridTeamH::operator=(GridTeamH const& cpy)
|
|||||||
mWidth = cpy.mWidth;
|
mWidth = cpy.mWidth;
|
||||||
mHeight = cpy.mHeight;
|
mHeight = cpy.mHeight;
|
||||||
mAliveCount = cpy.mAliveCount;
|
mAliveCount = cpy.mAliveCount;
|
||||||
|
mLastGenAliveCount = cpy.mLastGenAliveCount;
|
||||||
|
|
||||||
mData = new CellType[mWidth * mHeight];
|
mData = new CellType[mWidth * mHeight];
|
||||||
mIntermediateData = new CellType[mWidth * mHeight];
|
mIntermediateData = new CellType[mWidth * mHeight];
|
||||||
@ -60,6 +62,7 @@ GridTeamH& GridTeamH::operator=(GridTeamH&& mv) noexcept
|
|||||||
dealloc();
|
dealloc();
|
||||||
|
|
||||||
mAliveCount = mv.mAliveCount;
|
mAliveCount = mv.mAliveCount;
|
||||||
|
mLastGenAliveCount = mv.mLastGenAliveCount;
|
||||||
mWidth = mv.mWidth;
|
mWidth = mv.mWidth;
|
||||||
mHeight = mv.mHeight;
|
mHeight = mv.mHeight;
|
||||||
mData = mv.mData;
|
mData = mv.mData;
|
||||||
|
Loading…
Reference in New Issue
Block a user