Optimize loops calling endInstances()

Thankies to Drake Arconis/Alchemy~
This commit is contained in:
Inusaito Sayori
2015-01-12 18:06:49 -05:00
parent 03e9db98e6
commit 844444c33b
8 changed files with 14 additions and 17 deletions

View File

@@ -2320,7 +2320,7 @@ void LLGLNamePool::release(GLuint name)
//static
void LLGLNamePool::upkeepPools()
{
for (tracker_t::instance_iter iter = beginInstances(); iter != endInstances(); ++iter)
for (tracker_t::instance_iter iter = beginInstances(), iter_end = endInstances(); iter != iter_end; ++iter)
{
LLGLNamePool & pool = *iter;
pool.upkeep();
@@ -2330,7 +2330,7 @@ void LLGLNamePool::upkeepPools()
//static
void LLGLNamePool::cleanupPools()
{
for (tracker_t::instance_iter iter = beginInstances(); iter != endInstances(); ++iter)
for (tracker_t::instance_iter iter = beginInstances(), iter_end = endInstances(); iter != iter_end; ++iter)
{
LLGLNamePool & pool = *iter;
pool.cleanup();