Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4257 in orxonox.OLD for orxonox/branches/levelLoader/src/lib


Ignore:
Timestamp:
May 22, 2005, 2:39:59 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: performance-update when creating a new entity

Location:
orxonox/branches/levelLoader/src/lib/lang
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelLoader/src/lib/lang/base_object.cc

    r3651 r4257  
    3939BaseObject::~BaseObject ()
    4040{
    41   delete []this->className;
     41  //  delete []this->className;
    4242}
    4343
    44 void BaseObject::setClassName (char* className)
     44void BaseObject::setClassName (const char* className)
    4545{
    46   this->className = new char[strlen(className)+1];
    47   strcpy(this->className, className);
    48 }
    49 
    50 char* BaseObject::getClassName(void) const
    51 {
    52   return className;
     46  this->className = className;
    5347}
    5448
  • orxonox/branches/levelLoader/src/lib/lang/base_object.h

    r3651 r4257  
    1717  virtual ~BaseObject ();
    1818
    19   void setClassName (char* className);
    20   char* getClassName(void) const;
     19  void setClassName (const char* className);
     20  inline const char* getClassName(void) const { return this->className;};
    2121  bool isA (char* className);
    2222
     
    2525
    2626 private:
    27   char* className;
     27  const char* className;
    2828  bool finalized;
    2929};
Note: See TracChangeset for help on using the changeset viewer.