Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7203 in orxonox.OLD for branches/std/src/lib/lang/base_object.cc


Ignore:
Timestamp:
Mar 9, 2006, 5:28:10 PM (18 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/lib/lang/base_object.cc

    r7193 r7203  
    9595 * @brief set the name of the Object
    9696 */
    97 void BaseObject::setName (const char* objectName)
     97void BaseObject::setName (const std::string& objectName)
    9898{
    9999  if (this->objectName)
    100100    delete[] this->objectName;
    101   if (objectName != NULL)
    102   {
    103     this->objectName = new char[strlen(objectName)+1];
    104     strcpy(this->objectName, objectName);
     101  if (!objectName.empty())
     102  {
     103    this->objectName = new char[objectName.size()+1];
     104    strcpy(this->objectName, objectName.c_str());
    105105  }
    106106  else
Note: See TracChangeset for help on using the changeset viewer.