Changeset 3667 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Mar 30, 2005, 10:59:02 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/util/resource_manager.cc
r3666 r3667 222 222 else 223 223 { 224 tmpDir = imageDirs->enumerate(); 224 tIterator<char>* iterator = imageDirs->getIterator(); 225 tmpDir = iterator->nextElement(); 226 //tmpDir = imageDirs->enumerate(); 225 227 while(tmpDir) 226 228 { … … 230 232 tmpResource->pointer = new Texture(imgName); 231 233 delete []imgName; 232 tmpDir = i mageDirs->nextElement();234 tmpDir = iterator->nextElement(); 233 235 } 236 delete iterator; 234 237 } 235 238 if(!tmpResource) … … 326 329 327 330 tIterator<Resource>* iterator = resourceList->getIterator(); 328 //Resource* enumRes = resourceList->enumerate();329 331 Resource* enumRes = iterator->nextElement(); 330 332 while (enumRes) … … 345 347 Resource* ResourceManager::locateResourceByName(const char* fileName) 346 348 { 347 Resource* enumRes = resourceList->enumerate(); 349 // Resource* enumRes = resourceList->enumerate(); 350 tIterator<Resource>* iterator = resourceList->getIterator(); 351 Resource* enumRes = iterator->nextElement(); 348 352 while (enumRes) 349 353 { 350 354 if (!strcmp(fileName, enumRes->name)) 351 return enumRes; 352 enumRes = resourceList->nextElement(); 353 } 355 { 356 delete iterator; 357 return enumRes; 358 } 359 enumRes = iterator->nextElement(); 360 } 361 delete iterator; 354 362 return NULL; 355 363 } … … 362 370 Resource* ResourceManager::locateResourceByPointer(const void* pointer) 363 371 { 364 Resource* enumRes = resourceList->enumerate(); 372 // Resource* enumRes = resourceList->enumerate(); 373 tIterator<Resource>* iterator = resourceList->getIterator(); 374 Resource* enumRes = iterator->nextElement(); 365 375 while (enumRes) 366 376 { 367 377 if (pointer == enumRes->pointer) 368 return enumRes; 369 enumRes = resourceList->nextElement(); 370 } 378 { 379 delete iterator; 380 return enumRes; 381 } 382 enumRes = iterator->nextElement(); 383 } 384 delete iterator; 371 385 return NULL; 372 386 }
Note: See TracChangeset
for help on using the changeset viewer.