diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp index 9e58e3fc3b..8eb732ea98 100644 --- a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp +++ b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp @@ -149,22 +149,17 @@ void IRBuilder::Reset() MarkUsed.clear(); MarkUsed.reserve(100000); - for (unsigned i = 0; i < 32; i++) - { - GRegCache[i] = nullptr; - GRegCacheStore[i] = nullptr; - FRegCache[i] = nullptr; - FRegCacheStore[i] = nullptr; - } + GRegCache = {}; + GRegCacheStore = {}; + + FRegCache = {}; + FRegCacheStore = {}; CarryCache = nullptr; CarryCacheStore = nullptr; - for (unsigned i = 0; i < 8; i++) - { - CRCache[i] = nullptr; - CRCacheStore[i] = nullptr; - } + CRCache = {}; + CRCacheStore = {}; CTRCache = nullptr; CTRCacheStore = nullptr; diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.h b/Source/Core/Core/PowerPC/JitILCommon/IR.h index 7125fdc954..fe5e6c46b6 100644 --- a/Source/Core/Core/PowerPC/JitILCommon/IR.h +++ b/Source/Core/Core/PowerPC/JitILCommon/IR.h @@ -4,6 +4,7 @@ #pragma once +#include #include #include "Common/CommonTypes.h" @@ -427,15 +428,15 @@ private: std::vector MarkUsed; // Used for IRWriter std::vector ConstList; InstLoc curReadPtr; - InstLoc GRegCache[32]; - InstLoc GRegCacheStore[32]; - InstLoc FRegCache[32]; - InstLoc FRegCacheStore[32]; + std::array GRegCache; + std::array GRegCacheStore; + std::array FRegCache; + std::array FRegCacheStore; InstLoc CarryCache; InstLoc CarryCacheStore; InstLoc CTRCache; InstLoc CTRCacheStore; - InstLoc CRCache[8]; - InstLoc CRCacheStore[8]; + std::array CRCache; + std::array CRCacheStore; }; };