diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-09-28 17:50:24 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-09-28 19:03:03 +0200 |
commit | 068732fc9e1d3aaf2c353ad5bf4311e16fb46531 (patch) | |
tree | d57411ae6c3b152767aa6b1098837e6541790470 /src/mbgl/gl/context.cpp | |
parent | 9a41b8abaf75a344bd86d55878ee87179eb63d95 (diff) | |
download | qtlocation-mapboxgl-068732fc9e1d3aaf2c353ad5bf4311e16fb46531.tar.gz |
[core] don't iterate too much over program objects scheduled for deletion
Diffstat (limited to 'src/mbgl/gl/context.cpp')
-rw-r--r-- | src/mbgl/gl/context.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index fbe7b39a6f..03b0e7abdb 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -61,10 +61,8 @@ void Context::setDirtyState() { void Context::performCleanup() { for (GLuint id : abandonedPrograms) { - for (const auto& p : abandonedPrograms) { - if (program == p) { - program.setDirty(); - } + if (program == id) { + program.setDirty(); } MBGL_CHECK_ERROR(glDeleteProgram(id)); } |