ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/types/AtomType.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/types/AtomType.cpp (file contents):
Revision 1638 by chrisfen, Fri Oct 22 23:00:06 2004 UTC vs.
Revision 1652 by gezelter, Tue Oct 26 22:25:19 2004 UTC

# Line 13 | Line 13 | namespace oopse {
13      
14      // initialize to an error:
15      atp.ident = -1;
16 <    // make the type empty:
17 <    name = NULL;
16 >
17      // and massless:
18      mass = 0.0;
19      
# Line 30 | Line 29 | namespace oopse {
29      atp.is_FLARB = 0;  
30    }
31      
33  AtomType::~AtomType() {
34    if ( name != NULL ) free(name);
35  }
36
32    void AtomType::complete() {
33      
34      int status;
35  
36 <    if (name == NULL) {
36 >    if (name.empty()) {
37        sprintf( painCave.errMsg,
38                 "Attempting to complete an AtomType without giving "
39                 "it a name!\n");
# Line 50 | Line 45 | namespace oopse {
45      if (atp.ident == -1) {
46        sprintf( painCave.errMsg,
47                 "Attempting to complete AtomType %s without setting the"
48 <               " ident!/n", name);
48 >               " ident!/n", name.c_str());
49        painCave.severity = OOPSE_ERROR;
50        painCave.isFatal = 1;
51        simError();          
# Line 62 | Line 57 | namespace oopse {
57      
58      if (status != 0) {
59        sprintf( painCave.errMsg,
60 <               "Fortran rejected AtomType %s!\n", name);
60 >               "Fortran rejected AtomType %s!\n", name.c_str());
61        painCave.severity = OOPSE_ERROR;
62        painCave.isFatal = 1;
63        simError();          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines