SCI: Get LRU from list directly, instead of from a reverse iterator

This commit is contained in:
Colin Snover 2017-06-04 22:02:30 -05:00
parent 06e82211ee
commit b73906feb7

View File

@ -1098,7 +1098,7 @@ void ResourceManager::printLRU() {
void ResourceManager::freeOldResources() { void ResourceManager::freeOldResources() {
while (_maxMemoryLRU < _memoryLRU) { while (_maxMemoryLRU < _memoryLRU) {
assert(!_LRU.empty()); assert(!_LRU.empty());
Resource *goner = *_LRU.reverse_begin(); Resource *goner = _LRU.back();
removeFromLRU(goner); removeFromLRU(goner);
goner->unalloc(); goner->unalloc();
#ifdef SCI_VERBOSE_RESMAN #ifdef SCI_VERBOSE_RESMAN