--- branches/new_design/OOPSE-4/src/UseTheForce/WATER.cpp 2004/10/28 22:34:02 1683 +++ branches/new_design/OOPSE-4/src/UseTheForce/WATER.cpp 2004/11/03 18:00:36 1702 @@ -81,7 +81,7 @@ namespace WATER_NS{ } ~LinkedAtomType(){ if( next != NULL ) delete next; } - LinkedAtomType* find(char* key){ + LinkedAtomType* find(const char* key){ if( !strcmp(name, key) ) return this; if( next != NULL ) return next->find(key); return NULL; @@ -153,7 +153,7 @@ namespace WATER_NS{ } ~LinkedDirectionalType(){ if( next != NULL ) delete next; } - LinkedDirectionalType* find(char* key){ + LinkedDirectionalType* find(const char* key){ if( !strcmp(name, key) ) return this; if( next != NULL ) return next->find(key); return NULL; @@ -652,11 +652,11 @@ void WATER::initializeAtoms( int nAtoms, Atom** the_at double inertialMat[3][3]; for( i=0; ifind( the_atoms[i]->getType() ); + currentAtomType = headAtomType->find(the_atoms[i]->getType().c_str() ); if( currentAtomType == NULL ){ sprintf( painCave.errMsg, "AtomType error, %s not found in force file.\n", - the_atoms[i]->getType() ); + the_atoms[i]->getType().c_str() ); painCave.isFatal = 1; simError(); } @@ -669,11 +669,11 @@ void WATER::initializeAtoms( int nAtoms, Atom** the_at if( currentAtomType->isDirectional ){ currentDirectionalType = - headDirectionalType->find( the_atoms[i]->getType() ); + headDirectionalType->find(the_atoms[i]->getType().c_str() ); if( currentDirectionalType == NULL ){ sprintf( painCave.errMsg, "DirectionalType error, %s not found in force file.\n", - the_atoms[i]->getType() ); + the_atoms[i]->getType().c_str() ); painCave.isFatal = 1; simError(); }