--- trunk/OOPSE-2.0/src/types/AtomType.cpp 2004/10/22 22:54:15 1637 +++ trunk/OOPSE-2.0/src/types/AtomType.cpp 2004/10/26 22:25:19 1652 @@ -13,8 +13,7 @@ namespace oopse { // initialize to an error: atp.ident = -1; - // make the type empty: - name = NULL; + // and massless: mass = 0.0; @@ -30,15 +29,11 @@ namespace oopse { atp.is_FLARB = 0; } - AtomType::~AtomType() { - if ( name != NULL ) free(name); - } - void AtomType::complete() { int status; - if (name == NULL) { + if (name.empty()) { sprintf( painCave.errMsg, "Attempting to complete an AtomType without giving " "it a name!\n"); @@ -50,7 +45,7 @@ namespace oopse { if (atp.ident == -1) { sprintf( painCave.errMsg, "Attempting to complete AtomType %s without setting the" - " ident!/n", name); + " ident!/n", name.c_str()); painCave.severity = OOPSE_ERROR; painCave.isFatal = 1; simError(); @@ -58,11 +53,11 @@ namespace oopse { status = 0; - makeAtype(atp, &status); + makeAtype(&atp, &status); if (status != 0) { sprintf( painCave.errMsg, - "Fortran rejected AtomType %s!\n", name); + "Fortran rejected AtomType %s!\n", name.c_str()); painCave.severity = OOPSE_ERROR; painCave.isFatal = 1; simError();