compiler issues

This commit is contained in:
Jacob Gissinger
2021-01-29 19:12:26 -05:00
parent 797555b5ce
commit 8e255f619b
5 changed files with 7 additions and 6 deletions

View File

@ -1990,7 +1990,7 @@ void Atom::add_molecule_atom(Molecule *onemol, int iatom,
allocate space for type label map allocate space for type label map
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void Atom::add_label_map(char *mapID) void Atom::add_label_map(std::string mapID)
{ {
labelmapflag = 1; labelmapflag = 1;
lmaps = (LabelMap **) lmaps = (LabelMap **)

View File

@ -329,7 +329,7 @@ class Atom : protected Pointers {
int find_molecule(char *); int find_molecule(char *);
void add_molecule_atom(class Molecule *, int, int, tagint); void add_molecule_atom(class Molecule *, int, int, tagint);
void add_label_map(char *); void add_label_map(std::string mapID = "");
int find_label(std::string, int); int find_label(std::string, int);
void first_reorder(); void first_reorder();

View File

@ -668,7 +668,8 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag)
void Input::readtype(char *&str, int mode) void Input::readtype(char *&str, int mode)
{ {
int numflag = 1; int numflag = 1;
for (int i = 0; i < strlen(str); i++) int n = strlen(str);
for (int i = 0; i < n; i++)
if (!isdigit(str[i]) && str[i] != '*') numflag = 0; if (!isdigit(str[i]) && str[i] != '*') numflag = 0;
if (numflag) return; if (numflag) return;
if (!atom->labelmapflag) error->all(FLERR,fmt::format("Invalid type {}",str)); if (!atom->labelmapflag) error->all(FLERR,fmt::format("Invalid type {}",str));
@ -1593,7 +1594,7 @@ void Input::labelmap()
{ {
if (domain->box_exist == 0) if (domain->box_exist == 0)
error->all(FLERR,"Labelmap command before simulation box is defined"); error->all(FLERR,"Labelmap command before simulation box is defined");
if (!atom->labelmapflag) atom->add_label_map(""); if (!atom->labelmapflag) atom->add_label_map();
atom->lmaps[0]->modify_lmap(narg,arg); atom->lmaps[0]->modify_lmap(narg,arg);
} }

View File

@ -1974,7 +1974,7 @@ void ReadData::typelabels(std::vector<std::string> &mytypelabel, int myntypes, i
char *buf = new char[myntypes*MAXLINE]; char *buf = new char[myntypes*MAXLINE];
labelflag = 1; labelflag = 1;
if (!atom->labelmapflag) atom->add_label_map(""); if (!atom->labelmapflag) atom->add_label_map();
int eof = comm->read_lines_from_file(fp,myntypes,MAXLINE,buf); int eof = comm->read_lines_from_file(fp,myntypes,MAXLINE,buf);
if (eof) error->all(FLERR,"Unexpected end of data file"); if (eof) error->all(FLERR,"Unexpected end of data file");

View File

@ -932,7 +932,7 @@ void ReadRestart::type_arrays()
} else if (flag == LABELMAP) { } else if (flag == LABELMAP) {
read_int(); read_int();
atom->add_label_map(""); atom->add_label_map();
atom->lmaps[0]->read_restart(fp); atom->lmaps[0]->read_restart(fp);
} else error->all(FLERR, } else error->all(FLERR,