summaryrefslogtreecommitdiff
path: root/src/mbgl/gl
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-10 15:15:01 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-10 17:35:01 +0300
commit6a35147fec0ff4de7f4b7705218b45f741e5a085 (patch)
treee40393e8f8c0ed70556348e779d72f73969f2f9d /src/mbgl/gl
parent83a3c18bdb2637b9eff9a0f510debfe9dd86d6cb (diff)
downloadqtlocation-mapboxgl-6a35147fec0ff4de7f4b7705218b45f741e5a085.tar.gz
[core] Redundant id check in TexturePoolDeleter
Diffstat (limited to 'src/mbgl/gl')
-rw-r--r--src/mbgl/gl/object_store.cpp7
-rw-r--r--src/mbgl/gl/object_store.hpp2
2 files changed, 3 insertions, 6 deletions
diff --git a/src/mbgl/gl/object_store.cpp b/src/mbgl/gl/object_store.cpp
index 3072296a1e..4198c090a3 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 3ae1b6e2fe..9f82c5a95b 100644
--- a/src/mbgl/gl/object_store.hpp
+++ b/src/mbgl/gl/object_store.hpp
@@ -47,7 +47,7 @@ using ObjectPool = std::array<GLuint, TextureMax>;
struct TexturePoolDeleter {
ObjectStore* store;
- void operator()(ObjectPool ids) const;
+ void operator()(ObjectPool) const;
};
using UniqueProgram = std_experimental::unique_resource<GLuint, ProgramDeleter>;