simplify using utils::strdup()

This commit is contained in:
Axel Kohlmeyer
2021-03-18 20:56:04 -04:00
parent 1710fb86d3
commit a5563e8d04
18 changed files with 47 additions and 135 deletions

View File

@ -205,9 +205,7 @@ int FixTempBerendsen::modify_param(int narg, char **arg)
tflag = 0;
}
delete [] id_temp;
int n = strlen(arg[1]) + 1;
id_temp = new char[n];
strcpy(id_temp,arg[1]);
id_temp = utils::strdup(arg[1]);
int icompute = modify->find_compute(id_temp);
if (icompute < 0)