Skip to content

Commit

Permalink
remove memset
Browse files Browse the repository at this point in the history
  • Loading branch information
CaRoLZhangxy committed Feb 28, 2024
1 parent b005365 commit 499ed17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/api_cc/src/commonPT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void NeighborListDataPT::copy_from_nlist(const InputNlist& inlist,
max_num_neighbors = *max_element;
unsigned long nlist_size = (unsigned long)inum * max_num_neighbors;
jlist.resize(nlist_size);
memset(&jlist[0], -1, nlist_size * sizeof(int));
jlist.assign(nlist_size, -1);
for (int ii = 0; ii < inum; ++ii) {
int jnum = inlist.numneigh[ii];
numneigh[ii] = inlist.numneigh[ii];
Expand Down

0 comments on commit 499ed17

Please sign in to comment.