diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 966b30ee39..eabb005600 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -472,16 +472,16 @@ TextureCacheBase::TCacheEntryBase* TextureCacheBase::ReturnEntry(unsigned int st void TextureCacheBase::BindTextures() { - for (int i = 0; i < 8; ++i) + for (size_t i = 0; i < bound_textures.size(); ++i) { if (bound_textures[i]) - bound_textures[i]->Bind(i); + bound_textures[i]->Bind(static_cast(i)); } } void TextureCacheBase::UnbindTextures() { - std::fill(std::begin(bound_textures), std::end(bound_textures), nullptr); + bound_textures.fill(nullptr); } TextureCacheBase::TCacheEntryBase* TextureCacheBase::Load(const u32 stage) diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h index bffeb2aad7..3adec5ed47 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.h +++ b/Source/Core/VideoCommon/TextureCacheBase.h @@ -4,6 +4,7 @@ #pragma once +#include #include #include #include @@ -176,7 +177,7 @@ protected: alignas(16) u8* temp = nullptr; size_t temp_size = 0; - TCacheEntryBase* bound_textures[8] = {}; + std::array bound_textures{}; private: typedef std::multimap TexAddrCache;