simplify by using utils::strdup()

This commit is contained in:
Axel Kohlmeyer
2021-03-18 19:58:04 -04:00
parent c5ab2becd7
commit 59c0325f08
29 changed files with 53 additions and 135 deletions

View File

@ -41,9 +41,7 @@ ComputeInertiaChunk::ComputeInertiaChunk(LAMMPS *lmp, int narg, char **arg) :
// ID of compute chunk/atom
int n = strlen(arg[3]) + 1;
idchunk = new char[n];
strcpy(idchunk,arg[3]);
idchunk = utils::strdup(arg[3]);
init();