Changeset 7225 in orxonox.OLD for trunk/src/lib/util
- Timestamp:
- Mar 18, 2006, 12:04:39 PM (19 years ago)
- Location:
- trunk/src/lib/util
- Files:
-
- 3 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: -
trunk/src/lib/util/multi_type.h
r7221 r7225 48 48 MultiType& operator=(float value) { this->setFloat(value); return *this; }; 49 49 MultiType& operator=(char value) { this->setChar(value); return *this; }; 50 MultiType& operator=(const char* value) { this->setString(value); return *this; };51 50 MultiType& operator=(const std::string& value) { this->setString(value); return *this; }; 52 51
Note: See TracChangeset
for help on using the changeset viewer.