no if statement required before delete[]

This commit is contained in:
Axel Kohlmeyer
2022-04-10 19:55:24 -04:00
parent 3eec2eec9a
commit 74f2b67b1a
20 changed files with 46 additions and 46 deletions

View File

@ -1740,7 +1740,7 @@ int DumpCustom::modify_param(int narg, char **arg)
int i = utils::inumeric(FLERR,arg[1],false,lmp) - 1;
if (i < 0 || i >= nfield)
error->all(FLERR,"Illegal dump_modify command");
if (format_column_user[i]) delete[] format_column_user[i];
delete[] format_column_user[i];
format_column_user[i] = utils::strdup(arg[2]);
}
return 3;