Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 9, 2006, 5:28:10 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: compiles again, BUT well…. i do not expect it to run anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/std/src/story_entities/story_entity.cc

    r7193 r7203  
    4040  this->isRunning = false;
    4141
    42   this->loadFile = NULL;
     42  this->loadFile = "";
    4343  this->storyID = -1;
    4444  this->description = NULL;
     
    100100 * @param name the name of the path
    101101 */
    102 void StoryEntity::setLoadFile(const char* fileName)
    103 {
    104   if (this->loadFile)
    105     delete this->loadFile;
     102void StoryEntity::setLoadFile(const std::string& fileName)
     103{
    106104  if (ResourceManager::isFile(fileName))
    107105  {
    108     this->loadFile = new char[strlen(fileName)+1];
    109     strcpy(this->loadFile, fileName);
     106    this->loadFile =  fileName;
    110107  }
    111108  else
     
    149146{
    150147  PRINTF(3)("Grabbing the Worlds Settings\n", this->getLoadFile());
    151   if( getLoadFile() == NULL)
    152     return;
     148  if( getLoadFile().empty())
     149        return;
    153150  TiXmlDocument XMLDoc(this->getLoadFile());
    154151  // load the xml world file for further loading
    155152  if( !XMLDoc.LoadFile())
    156153  {
    157     PRINTF(1)("loading XML File: %s @ %s:l%d:c%d\n", XMLDoc.ErrorDesc(), this->getLoadFile(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol());
     154    PRINTF(1)("loading XML File: %s @ %s:l%d:c%d\n", XMLDoc.ErrorDesc(), this->getLoadFile().c_str(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol());
    158155    return;
    159156  }
Note: See TracChangeset for help on using the changeset viewer.