ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/UseTheForce/WATER.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/UseTheForce/WATER.cpp (file contents):
Revision 1683, Thu Oct 28 22:34:02 2004 UTC vs.
Revision 1702 by tim, Wed Nov 3 18:00:36 2004 UTC

# Line 81 | Line 81 | namespace WATER_NS{
81      }
82      ~LinkedAtomType(){ if( next != NULL ) delete next; }
83  
84 <    LinkedAtomType* find(char* key){
84 >    LinkedAtomType* find(const char* key){
85        if( !strcmp(name, key) ) return this;
86        if( next != NULL ) return next->find(key);
87        return NULL;
# Line 153 | Line 153 | namespace WATER_NS{
153      }
154      ~LinkedDirectionalType(){ if( next != NULL ) delete next; }
155  
156 <    LinkedDirectionalType* find(char* key){
156 >    LinkedDirectionalType* find(const char* key){
157        if( !strcmp(name, key) ) return this;
158        if( next != NULL ) return next->find(key);
159        return NULL;
# Line 652 | Line 652 | void WATER::initializeAtoms( int nAtoms, Atom** the_at
652    double inertialMat[3][3];
653  
654    for( i=0; i<nAtoms; i++ ){
655 <    currentAtomType = headAtomType->find( the_atoms[i]->getType() );
655 >    currentAtomType = headAtomType->find(the_atoms[i]->getType().c_str() );
656      if( currentAtomType == NULL ){
657        sprintf( painCave.errMsg,
658                 "AtomType error, %s not found in force file.\n",
659 <               the_atoms[i]->getType() );
659 >               the_atoms[i]->getType().c_str() );
660        painCave.isFatal = 1;
661        simError();
662      }
# Line 669 | Line 669 | void WATER::initializeAtoms( int nAtoms, Atom** the_at
669  
670      if( currentAtomType->isDirectional ){
671        currentDirectionalType =
672 <        headDirectionalType->find( the_atoms[i]->getType() );
672 >        headDirectionalType->find(the_atoms[i]->getType().c_str() );
673        if( currentDirectionalType == NULL ){
674          sprintf( painCave.errMsg,
675                   "DirectionalType error, %s not found in force file.\n",
676 <                 the_atoms[i]->getType() );
676 >                 the_atoms[i]->getType().c_str() );
677          painCave.isFatal = 1;
678          simError();
679        }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines