allow const char * argument
This commit is contained in:
@ -1891,11 +1891,10 @@ void Atom::add_molecule(int narg, char **arg)
|
||||
return -1 if does not exist
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int Atom::find_molecule(char *id)
|
||||
int Atom::find_molecule(const char *id)
|
||||
{
|
||||
if (id == nullptr) return -1;
|
||||
int imol;
|
||||
for (imol = 0; imol < nmolecule; imol++)
|
||||
for (int imol = 0; imol < nmolecule; imol++)
|
||||
if (strcmp(id,molecules[imol]->id) == 0) return imol;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -344,7 +344,7 @@ class Atom : protected Pointers {
|
||||
int shape_consistency(int, double &, double &, double &);
|
||||
|
||||
void add_molecule(int, char **);
|
||||
int find_molecule(char *);
|
||||
int find_molecule(const char *);
|
||||
void add_molecule_atom(class Molecule *, int, int, tagint);
|
||||
|
||||
void first_reorder();
|
||||
|
||||
Reference in New Issue
Block a user