diff --git a/src/mbgl/gl/object_store.cpp b/src/mbgl/gl/object_store.cpp index 3072296a1..4198c090a 100644 --- a/src/mbgl/gl/object_store.cpp +++ b/src/mbgl/gl/object_store.cpp @@ -32,11 +32,8 @@ void VAODeleter::operator()(GLuint id) const { void TexturePoolDeleter::operator()(ObjectPool ids) const { assert(store); - for (GLuint& id : ids) { - if (id) { - store->abandonedTextures.push_back(id); - id = 0; - }; + for (const auto& id : ids) { + store->abandonedTextures.push_back(id); } } diff --git a/src/mbgl/gl/object_store.hpp b/src/mbgl/gl/object_store.hpp index 3ae1b6e2f..9f82c5a95 100644 --- a/src/mbgl/gl/object_store.hpp +++ b/src/mbgl/gl/object_store.hpp @@ -47,7 +47,7 @@ using ObjectPool = std::array; struct TexturePoolDeleter { ObjectStore* store; - void operator()(ObjectPool ids) const; + void operator()(ObjectPool) const; }; using UniqueProgram = std_experimental::unique_resource;