Changeset 7208 in orxonox.OLD for branches/std/src/lib/graphics/importer/media_container.cc
- Timestamp:
- Mar 10, 2006, 1:56:40 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/lib/graphics/importer/media_container.cc
r7203 r7208 34 34 * Default constructor 35 35 */ 36 MediaContainer::MediaContainer(const char*filename)36 MediaContainer::MediaContainer(const std::string& filename) 37 37 { 38 38 // set the class id for the base object … … 41 41 fps = 0; 42 42 mediaLoaded = false; 43 44 this->loadMedia(filename);43 if (!filename.empty()) 44 this->loadMedia(filename); 45 45 } 46 46 … … 84 84 } 85 85 86 bool MediaContainer::loadMedia(const char*filename)86 bool MediaContainer::loadMedia(const std::string& filename) 87 87 { 88 88 this->unloadMedia(); 89 89 90 if(filename == NULL)90 if(filename.empty()) 91 91 return false; 92 92 // check whether file exists 93 93 if(!ResourceManager::isInDataDir(filename)) 94 94 { 95 PRINTF(1)("Could not find %s\n", filename );95 PRINTF(1)("Could not find %s\n", filename.c_str()); 96 96 return false; 97 97 }
Note: See TracChangeset
for help on using the changeset viewer.