Changeset 3677 in orxonox.OLD for orxonox/trunk/src/lib/util
- Timestamp:
- Mar 30, 2005, 6:15:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/util/resource_manager.cc
r3676 r3677 175 175 // searching if the resource was loaded before. 176 176 Resource* tmpResource = this->locateResourceByName(fileName); 177 if (!tmpResource) // if the resource was not loaded before. 177 if (tmpResource) // if the resource was not loaded before. 178 { 179 PRINTF(4)("not loading cached resource %s\n", tmpResource->name); 180 tmpResource->count++; 181 if(tmpResource->prio < prio) 182 tmpResource->prio = prio; 183 } 184 else 178 185 { 179 186 char* tmpDir; … … 252 259 delete []fullName; 253 260 } 254 else255 {256 PRINTF(4)("not loading cached resource %s\n", tmpResource->name);257 tmpResource->count++;258 if(tmpResource->prio < prio)259 tmpResource->prio = prio;260 }261 261 262 262 return tmpResource->pointer; … … 330 330 { 331 331 if (enumRes->prio <= prio) 332 unload(enumRes, prio); 332 if (enumRes->count == 0) 333 unload(enumRes, prio); 334 else 335 PRINTF(2)("unable to unload %s because there are still %d references to it\n", 336 enumRes->name, enumRes->count); 333 337 //enumRes = resourceList->nextElement(); 334 338 enumRes = iterator->nextElement();
Note: See TracChangeset
for help on using the changeset viewer.