use memset() for clearing of arrays
This commit is contained in:
@ -1248,7 +1248,7 @@ void ReadData::bonds(int firstpass)
|
||||
int *count = NULL;
|
||||
if (firstpass) {
|
||||
memory->create(count,nlocal,"read_data:count");
|
||||
for (int i = 0; i < nlocal; i++) count[i] = 0;
|
||||
memset(count,0,nlocal*sizeof(int));
|
||||
}
|
||||
|
||||
// read and process bonds
|
||||
@ -1331,7 +1331,7 @@ void ReadData::angles(int firstpass)
|
||||
int *count = NULL;
|
||||
if (firstpass) {
|
||||
memory->create(count,nlocal,"read_data:count");
|
||||
for (int i = 0; i < nlocal; i++) count[i] = 0;
|
||||
memset(count,0,nlocal*sizeof(int));
|
||||
}
|
||||
|
||||
// read and process angles
|
||||
@ -1414,7 +1414,7 @@ void ReadData::dihedrals(int firstpass)
|
||||
int *count = NULL;
|
||||
if (firstpass) {
|
||||
memory->create(count,nlocal,"read_data:count");
|
||||
for (int i = 0; i < nlocal; i++) count[i] = 0;
|
||||
memset(count,0,nlocal*sizeof(int));
|
||||
}
|
||||
|
||||
// read and process dihedrals
|
||||
@ -1497,7 +1497,7 @@ void ReadData::impropers(int firstpass)
|
||||
int *count = NULL;
|
||||
if (firstpass) {
|
||||
memory->create(count,nlocal,"read_data:count");
|
||||
for (int i = 0; i < nlocal; i++) count[i] = 0;
|
||||
memset(count,0,nlocal*sizeof(int));
|
||||
}
|
||||
|
||||
// read and process impropers
|
||||
|
||||
Reference in New Issue
Block a user