From 1777b8757a437d6f27928c2bb3d821fc8679cf20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Wed, 28 Sep 2016 17:54:33 +0200 Subject: [PATCH] [core] don't iterate over references to uint32_t --- src/mbgl/gl/context.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index 03b0e7abd..504e522da 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -74,10 +74,10 @@ void Context::performCleanup() { abandonedShaders.clear(); if (!abandonedBuffers.empty()) { - for (const auto& b : abandonedBuffers) { - if (vertexBuffer == b) { + for (const auto id : abandonedBuffers) { + if (vertexBuffer == id) { vertexBuffer.setDirty(); - } else if (elementBuffer == b) { + } else if (elementBuffer == id) { elementBuffer.setDirty(); } } @@ -86,8 +86,8 @@ void Context::performCleanup() { } if (!abandonedTextures.empty()) { - for (const auto& t : abandonedTextures) { - if (activeTexture == t) { + for (const auto id : abandonedTextures) { + if (activeTexture == id) { activeTexture.setDirty(); } } @@ -96,8 +96,8 @@ void Context::performCleanup() { } if (!abandonedVAOs.empty()) { - for (const auto& v : abandonedVAOs) { - if (vertexArrayObject == v) { + for (const auto id : abandonedVAOs) { + if (vertexArrayObject == id) { vertexArrayObject.setDirty(); } } @@ -106,8 +106,8 @@ void Context::performCleanup() { } if (!abandonedFBOs.empty()) { - for (const auto& f : abandonedFBOs) { - if (bindFramebuffer == f) { + for (const auto id : abandonedFBOs) { + if (bindFramebuffer == id) { bindFramebuffer.setDirty(); } }