Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/atom_particleinfo.cpp

    rb8d4a3 ra3696f  
    1313ParticleInfo::ParticleInfo() : nr(-1), Name(NULL) {};
    1414
    15 ParticleInfo::ParticleInfo(ParticleInfo *pointer) :
    16     nr(pointer->nr),
    17     Name(pointer->Name)
    18     {
    19       if (Name == NULL)
    20         Name = " ";
    21     }
    22 
    23 
    2415/** Destructor of ParticleInfo.
    2516 */
     
    3122ostream & operator << (ostream &ost, const ParticleInfo &a)
    3223{
    33   ost << "[" << a.Name << "|" << &a << "]";
     24  if (a.Name == NULL)
     25    ost << "[NULL]";
     26  else
     27    ost << "[" << a.Name << "|" << &a << "]";
    3428  return ost;
    3529};
     
    3731ostream & ParticleInfo::operator << (ostream &ost) const
    3832{
    39   ost << "[" << Name << "|" << this << "]";
     33  if (Name == NULL)
     34    ost << "[NULL]";
     35  else
     36    ost << "[" << Name << "|" << this << "]";
    4037  return ost;
    4138};
Note: See TracChangeset for help on using the changeset viewer.