This pattern was only useful when we used mutex locks, which the previous
commit removed.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
if (*ptr) {
/* Unreference the old array object */
- GLboolean deleteFlag = GL_FALSE;
struct gl_vertex_array_object *oldObj = *ptr;
assert(oldObj->RefCount > 0);
oldObj->RefCount--;
- deleteFlag = (oldObj->RefCount == 0);
- if (deleteFlag)
+ if (oldObj->RefCount == 0)
_mesa_delete_vao(ctx, oldObj);
*ptr = NULL;
if (*ptr) {
/* Unreference the old pipeline object */
- GLboolean deleteFlag = GL_FALSE;
struct gl_pipeline_object *oldObj = *ptr;
assert(oldObj->RefCount > 0);
oldObj->RefCount--;
- deleteFlag = (oldObj->RefCount == 0);
- if (deleteFlag) {
+ if (oldObj->RefCount == 0) {
_mesa_delete_pipeline_object(ctx, oldObj);
}