Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3666 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Mar 30, 2005, 9:38:44 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: still got segfault because of deprecated list enumeration method in resourcemanager. changed to iterator, now there are no segfaults anymore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/util/resource_manager.cc

    r3665 r3666  
    324324bool ResourceManager::unloadAllByPriority(ResourcePriority prio)
    325325{
    326   Resource* enumRes = resourceList->enumerate();
     326
     327  tIterator<Resource>* iterator = resourceList->getIterator();
     328  //Resource* enumRes = resourceList->enumerate();
     329  Resource* enumRes = iterator->nextElement();
    327330  while (enumRes)
    328331    {
    329332      if (enumRes->prio <= prio)
    330333        unload(enumRes, prio);
    331       enumRes = resourceList->nextElement();
    332     }
     334      //enumRes = resourceList->nextElement();
     335      enumRes = iterator->nextElement();
     336    }
     337  delete iterator;
    333338}
    334339
Note: See TracChangeset for help on using the changeset viewer.