Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7199 in orxonox.OLD for trunk/src/lib/util/loading


Ignore:
Timestamp:
Mar 8, 2006, 10:46:37 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: MultiType rework (now uses std::string) this is more compliant, and better to handle

File:
1 edited

Legend:

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

    r7196 r7199  
    451451        tmpResource->param[0] = param0;
    452452        tmpResource->param[1] = param1;
    453         tmpResource->pointer = new MD2Data(fullName, tmpResource->param[0].getString(), tmpResource->param[1].getFloat());
     453        tmpResource->pointer = new MD2Data(fullName, tmpResource->param[0].getCString(), tmpResource->param[1].getFloat());
    454454      }
    455455      break;
     
    520520        {
    521521          MultiType param = param0; /// HACK
    522           char* secFullName = ResourceManager::getFullName(param.getString());
     522          char* secFullName = ResourceManager::getFullName(param.getCString());
    523523          if (ResourceManager::isFile(secFullName))
    524524          {
     
    747747  int len = strlen(ResourceManager::ResourceTypeToChar(this->resourceList[i]->type));
    748748  len += strlen(this->resourceList[i]->name);
    749   if (this->resourceList[i]->param[0].getString()) len += strlen(this->resourceList[i]->param[0].getString()) +1;
    750   if (this->resourceList[i]->param[1].getString()) len += strlen(this->resourceList[i]->param[1].getString()) +1;
    751   if (this->resourceList[i]->param[2].getString()) len += strlen(this->resourceList[i]->param[2].getString()) +1;
     749  if (this->resourceList[i]->param[0].getCString()) len += strlen(this->resourceList[i]->param[0].getCString()) +1;
     750  if (this->resourceList[i]->param[1].getCString()) len += strlen(this->resourceList[i]->param[1].getCString()) +1;
     751  if (this->resourceList[i]->param[2].getCString()) len += strlen(this->resourceList[i]->param[2].getCString()) +1;
    752752  len += 10;
    753753  char* tmp = new char[len];
     
    756756  strcat(tmp,",");
    757757  strcat (tmp, this->resourceList[i]->name);
    758   if (this->resourceList[i]->param[0].getString() && this->resourceList[i]->param[0].getString() != '\0')
     758  if (this->resourceList[i]->param[0].getCString() && this->resourceList[i]->param[0].getCString() != '\0')
    759759  {
    760760    strcat(tmp,",");
    761     strcat( tmp, this->resourceList[i]->param[0].getString());
    762   }
    763   if (this->resourceList[i]->param[1].getString() && this->resourceList[i]->param[1].getString() != '\0')
     761    strcat( tmp, this->resourceList[i]->param[0].getCString());
     762  }
     763  if (this->resourceList[i]->param[1].getCString() && this->resourceList[i]->param[1].getCString() != '\0')
    764764  {
    765765    strcat(tmp,",");
    766     strcat( tmp, this->resourceList[i]->param[1].getString());
    767   }
    768   if (this->resourceList[i]->param[2].getString() && this->resourceList[i]->param[2].getString() != '\0')
     766    strcat( tmp, this->resourceList[i]->param[1].getCString());
     767  }
     768  if (this->resourceList[i]->param[2].getCString() && this->resourceList[i]->param[2].getCString() != '\0')
    769769  {
    770770    strcat(tmp,",");
    771     strcat( tmp, this->resourceList[i]->param[2].getString());
     771    strcat( tmp, this->resourceList[i]->param[2].getCString());
    772772  }
    773773  return tmp;
Note: See TracChangeset for help on using the changeset viewer.