Skip to content

Commit

Permalink
better copy in simple temporary data
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Oct 20, 2021
1 parent 18e841e commit 0848771
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vcg/container/simple_temporary_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ class VectorNBW<bool, p...>
return;
bool* newdataLoc = new bool[sz];
if (datasize != 0) {
std::copy(booldata, booldata+datasize, newdataLoc);
// memcpy(newdataLoc, booldata, sizeof(bool) * sizeof(datasize));
for (unsigned int i = 0; i < datasize; ++i)
newdataLoc[i] = booldata[i];
}

std::swap(booldata, newdataLoc);
Expand Down

0 comments on commit 0848771

Please sign in to comment.