From 57c21b9576aa5e7f840fa77e275cbeaa5ac97716 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 25 Mar 2017 14:45:55 -0400 Subject: TextureCacheBase: Convert bound_textures from a C array to a std::array Prevents array-to-pointer decay and simplifies some code. --- Source/Core/VideoCommon/TextureCacheBase.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp') 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) -- cgit v1.2.3