fix clang warning

uninitialized variable (glGen functions set the value)
This commit is contained in:
Mike Erwin 2017-02-07 13:49:50 -05:00 committed by Julian Eisel
parent 8add4cc900
commit 3f9f82f3c4
1 changed files with 2 additions and 3 deletions

View File

@ -53,7 +53,7 @@ GLuint buffer_id_alloc()
}
orphan_mutex.unlock();
GLuint new_buffer_id;
GLuint new_buffer_id = 0;
glGenBuffers(1, &new_buffer_id);
return new_buffer_id;
}
@ -80,8 +80,6 @@ GLuint vao_id_alloc()
assert(thread_is_main());
#endif
GLuint new_vao_id;
// delete orphaned IDs
orphan_mutex.lock();
if (!orphaned_vao_ids.empty())
@ -95,6 +93,7 @@ GLuint vao_id_alloc()
}
orphan_mutex.unlock();
GLuint new_vao_id = 0;
glGenVertexArrays(1, &new_vao_id);
return new_vao_id;
}