[core] Redundant id check in TexturePoolDeleter
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user