[core] Redundant id check in TexturePoolDeleter

This commit is contained in:
Bruno de Oliveira Abinader
2016-06-10 15:15:01 +03:00
parent 83a3c18bdb
commit 6a35147fec
2 changed files with 3 additions and 6 deletions

View File

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

View File

@@ -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>;