replace variable length array in Molecule class with new/delete

This commit is contained in:
Axel Kohlmeyer
2018-05-04 21:41:23 -04:00
parent 7edeccae80
commit c83fedf100

View File

@ -1111,7 +1111,7 @@ void Molecule::special_generate()
{
int newton_bond = force->newton_bond;
tagint atom1,atom2;
int count[natoms];
int *count = new int[natoms];
// temporary array for special atoms
@ -1197,6 +1197,7 @@ void Molecule::special_generate()
}
}
}
delete[] count;
maxspecial = 0;
for (int i = 0; i < natoms; i++)