From f99106ccb1184f58eec35c796212a0e0c6423dc8 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Fri, 24 Jun 2022 17:56:50 +0200 Subject: [PATCH] MemoryCardFolder: Cleanup variable scope. Codacy. --- pcsx2/MemoryCardFolder.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pcsx2/MemoryCardFolder.cpp b/pcsx2/MemoryCardFolder.cpp index 124c15ebf1..6220ad8350 100644 --- a/pcsx2/MemoryCardFolder.cpp +++ b/pcsx2/MemoryCardFolder.cpp @@ -1936,13 +1936,11 @@ void FolderMemoryCard::CalculateECC(u8* ecc, const u8* data) 0xc3, 0x44, 0x55, 0xd2, 0x66, 0xe1, 0xf0, 0x77, 0x77, 0xf0, 0xe1, 0x66, 0xd2, 0x55, 0x44, 0xc3, 0x00, 0x87, 0x96, 0x11, 0xa5, 0x22, 0x33, 0xb4, 0xb4, 0x33, 0x22, 0xa5, 0x11, 0x96, 0x87, 0x00}; - int i, c; - ecc[0] = ecc[1] = ecc[2] = 0; - for (i = 0; i < 0x80; i++) + for (int i = 0; i < 0x80; i++) { - c = Table[data[i]]; + const int c = Table[data[i]]; ecc[0] ^= c; if (c & 0x80)