From 4095ffba071ba1de87896dab8c4b9c6c160819ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Leclaire-Fournier?= Date: Mon, 22 Jan 2024 21:58:03 -0500 Subject: [PATCH] Retire variable inutile --- GPA675Lab1GOL/GOLTeamH.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/GPA675Lab1GOL/GOLTeamH.cpp b/GPA675Lab1GOL/GOLTeamH.cpp index 3c8caea..0906ed0 100644 --- a/GPA675Lab1GOL/GOLTeamH.cpp +++ b/GPA675Lab1GOL/GOLTeamH.cpp @@ -497,16 +497,11 @@ void GOLTeamH::updateImage(uint32_t* buffer, size_t buffer_size) const // Pointeur qui se promène en mémoire. auto* ptrGrid{ reinterpret_cast(&mData.data()[0]) }; - // Variable qui va décoder l'état d'une cellule. - auto var{ *ptrGrid }; - // On itère sur chaque éléments du tableau et on associe la couleur. while (s_ptr < e_ptr) { - var = *ptrGrid; - *s_ptr &= 0; // Clear *s_ptr |= MAX_ALPHA << 24; // Alpha = 255 - *s_ptr |= mColorEncoded >> (32 * var); + *s_ptr |= mColorEncoded >> (32 * (*ptrGrid)); s_ptr++; ptrGrid++;