summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/Src/TextureCache.cpp
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2013-10-29 01:09:01 -0400
committercomex <comexk@gmail.com>2013-11-03 20:54:01 -0500
commit965b32be9c38cb8f03632ab15f3a0d3aa98004af (patch)
tree8b27dd92a256dcbe0a41addf9ea4791332ed03dc /Source/Core/VideoBackends/OGL/Src/TextureCache.cpp
parent00fe5057f13bca3416b9d25a1fe9df27c514b29c (diff)
Run code through clang-modernize -loop-convert to create range-based for loops, and manually fix some stuff up.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/Src/TextureCache.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/Src/TextureCache.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/VideoBackends/OGL/Src/TextureCache.cpp b/Source/Core/VideoBackends/OGL/Src/TextureCache.cpp
index 7810ff00eb..a9d23d78c8 100644
--- a/Source/Core/VideoBackends/OGL/Src/TextureCache.cpp
+++ b/Source/Core/VideoBackends/OGL/Src/TextureCache.cpp
@@ -88,9 +88,9 @@ TextureCache::TCacheEntry::~TCacheEntry()
{
if (texture)
{
- for(int i=0; i<8; i++)
- if(s_Textures[i] == texture)
- s_Textures[i] = 0;
+ for(auto& gtex : s_Textures)
+ if(gtex == texture)
+ gtex = 0;
glDeleteTextures(1, &texture);
texture = 0;
}
@@ -449,8 +449,8 @@ TextureCache::TextureCache()
s_ActiveTexture = -1;
s_NextStage = -1;
- for(int i=0; i<8; i++)
- s_Textures[i] = -1;
+ for(auto& gtex : s_Textures)
+ gtex = -1;
}
@@ -459,9 +459,9 @@ TextureCache::~TextureCache()
s_ColorMatrixProgram.Destroy();
s_DepthMatrixProgram.Destroy();
- for(std::map<u64, VBOCache>::iterator it = s_VBO.begin(); it != s_VBO.end(); it++) {
- glDeleteBuffers(1, &it->second.vbo);
- glDeleteVertexArrays(1, &it->second.vao);
+ for(auto& cache : s_VBO) {
+ glDeleteBuffers(1, &cache.second.vbo);
+ glDeleteVertexArrays(1, &cache.second.vao);
}
s_VBO.clear();
}