[core] don't iterate over references to uint32_t

This commit is contained in:
Konstantin Käfer
2016-09-28 17:54:33 +02:00
parent 068732fc9e
commit 1777b8757a

View File

@@ -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();
}
}