simplify/optimize code

This commit is contained in:
Axel Kohlmeyer
2021-09-15 16:09:30 -04:00
parent a8220a8502
commit 3caa066c28
3 changed files with 40 additions and 60 deletions

View File

@ -351,7 +351,5 @@ void ComputePressure::virial_compute(int n, int ndiag)
void ComputePressure::reset_extra_compute_fix(const char *id_new)
{
delete [] id_temp;
int n = strlen(id_new) + 1;
id_temp = new char[n];
strcpy(id_temp,id_new);
id_temp = utils::strdup(id_new);
}