Changeset 7225 in orxonox.OLD for trunk/src/lib/util/loading
- Timestamp:
- Mar 18, 2006, 12:04:39 PM (19 years ago)
- Location:
- trunk/src/lib/util/loading
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/loading/resource_manager.cc
r7221 r7225 1009 1009 * @returns the Number of the Type, or 0 (defautl) if not found. 1010 1010 */ 1011 ResourceType ResourceManager::stringToResourceType(const char* resourceType) 1012 { 1013 assert(resourceType != NULL); 1011 ResourceType ResourceManager::stringToResourceType(const std::string& resourceType) 1012 { 1014 1013 for (unsigned int i = 0; i < RESOURCE_TYPE_SIZE; i++) 1015 if ( !strcmp(resourceType, ResourceManager::resourceNames[i]))1014 if (resourceType == ResourceManager::resourceNames[i]) 1016 1015 return (ResourceType)i; 1017 1016 return (ResourceType)0; -
trunk/src/lib/util/loading/resource_manager.h
r7221 r7225 141 141 142 142 static const char* ResourceTypeToChar(ResourceType type); 143 static ResourceType stringToResourceType(const char*resourceType);143 static ResourceType stringToResourceType(const std::string& resourceType); 144 144 145 145 private:
Note: See TracChangeset
for help on using the changeset viewer.