Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/atom_particleinfo.cpp

    r68f03d rb8d4a3  
    1111/** Constructor of ParticleInfo.
    1212 */
    13 ParticleInfo::ParticleInfo() : nr(-1), name("Unknown") {
    14 };
     13ParticleInfo::ParticleInfo() : nr(-1), Name(NULL) {};
    1514
    1615ParticleInfo::ParticleInfo(ParticleInfo *pointer) :
    1716    nr(pointer->nr),
    18     name(pointer->name)
    19     {}
     17    Name(pointer->Name)
     18    {
     19      if (Name == NULL)
     20        Name = " ";
     21    }
    2022
    2123
     
    2325 */
    2426ParticleInfo::~ParticleInfo()
    25 {};
    26 
    27 const string& ParticleInfo::getName() const{
    28   return name;
    29 }
    30 
    31 void ParticleInfo::setName(const string& _name){
    32   name = _name;
    33 }
     27{
     28  Free(&Name);
     29};
    3430
    3531ostream & operator << (ostream &ost, const ParticleInfo &a)
    3632{
    37   ost << "[" << a.getName() << "|" << &a << "]";
     33  ost << "[" << a.Name << "|" << &a << "]";
    3834  return ost;
    3935};
     
    4137ostream & ParticleInfo::operator << (ostream &ost) const
    4238{
    43   ost << "[" << name << "|" << this << "]";
     39  ost << "[" << Name << "|" << this << "]";
    4440  return ost;
    4541};
Note: See TracChangeset for help on using the changeset viewer.