Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7225 in orxonox.OLD for trunk/src/lib/util


Ignore:
Timestamp:
Mar 18, 2006, 12:04:39 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: more std::string

Location:
trunk/src/lib/util
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/loading/resource_manager.cc

    r7221 r7225  
    10091009 * @returns the Number of the Type, or 0 (defautl) if not found.
    10101010 */
    1011 ResourceType ResourceManager::stringToResourceType(const char* resourceType)
    1012 {
    1013   assert(resourceType != NULL);
     1011ResourceType ResourceManager::stringToResourceType(const std::string& resourceType)
     1012{
    10141013  for (unsigned int i = 0; i < RESOURCE_TYPE_SIZE; i++)
    1015     if (!strcmp(resourceType, ResourceManager::resourceNames[i]))
     1014    if (resourceType == ResourceManager::resourceNames[i])
    10161015      return (ResourceType)i;
    10171016  return (ResourceType)0;
  • trunk/src/lib/util/loading/resource_manager.h

    r7221 r7225  
    141141
    142142  static const char* ResourceTypeToChar(ResourceType type);
    143   static ResourceType stringToResourceType(const char* resourceType);
     143  static ResourceType stringToResourceType(const std::string& resourceType);
    144144
    145145 private:
  • trunk/src/lib/util/multi_type.h

    r7221 r7225  
    4848    MultiType& operator=(float value) { this->setFloat(value); return *this; };
    4949    MultiType& operator=(char value) { this->setChar(value); return *this; };
    50     MultiType& operator=(const char* value) { this->setString(value); return *this; };
    5150    MultiType& operator=(const std::string& value) { this->setString(value); return *this; };
    5251
Note: See TracChangeset for help on using the changeset viewer.