mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 03:40:25 +00:00
SCI: Get LRU from list directly, instead of from a reverse iterator
This commit is contained in:
parent
06e82211ee
commit
b73906feb7
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user