From 33a92d4667dc3f24550b59e9b87ae1a1377e051b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Leclaire-Fournier?= Date: Mon, 12 Feb 2024 09:48:49 -0500 Subject: [PATCH] Petit fix --- GPA675Lab1GOL/GridTeamH.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GPA675Lab1GOL/GridTeamH.cpp b/GPA675Lab1GOL/GridTeamH.cpp index 747e991..c28e999 100644 --- a/GPA675Lab1GOL/GridTeamH.cpp +++ b/GPA675Lab1GOL/GridTeamH.cpp @@ -22,6 +22,7 @@ GridTeamH::GridTeamH(GridTeamH const& cpy) : GridTeamH(cpy.width(), cpy.height(), CellType::alive) { mAliveCount = cpy.mAliveCount; + mLastGenAliveCount = cpy.mLastGenAliveCount; memcpy(mData, cpy.mData, 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; mHeight = cpy.mHeight; mAliveCount = cpy.mAliveCount; + mLastGenAliveCount = cpy.mLastGenAliveCount; mData = new CellType[mWidth * mHeight]; mIntermediateData = new CellType[mWidth * mHeight]; @@ -60,6 +62,7 @@ GridTeamH& GridTeamH::operator=(GridTeamH&& mv) noexcept dealloc(); mAliveCount = mv.mAliveCount; + mLastGenAliveCount = mv.mLastGenAliveCount; mWidth = mv.mWidth; mHeight = mv.mHeight; mData = mv.mData;