Merge pull request #18207 from pemmanuelviel:pev--fix-memset

pull/18225/head
Alexander Alekhin 4 years ago
commit 7ce56b3a47
  1. 2
      modules/flann/include/opencv2/flann/kmeans_index.h

@ -773,7 +773,7 @@ private:
memoryCounter_ += int(veclen_*sizeof(CentersType));
unsigned int* mean_accumulator = new unsigned int[accumulator_veclen];
memset(mean_accumulator, 0, accumulator_veclen);
memset(mean_accumulator, 0, sizeof(unsigned int)*accumulator_veclen);
for (unsigned int i=0; i<indices_length; ++i) {
variance += static_cast<unsigned long long>( ensureSquareDistance<Distance>(

Loading…
Cancel
Save