remove memset from align_pair.h and marching_cubes.h

This commit is contained in:
alemuntoni 2021-10-19 11:57:02 +02:00
parent ca59ed7c8d
commit 70ac3d8248
2 changed files with 17 additions and 16 deletions

View File

@ -128,22 +128,21 @@ public:
public:
IterInfo()
{
memset ( (void *) this, 0, sizeof(IterInfo));
}
double MinDistAbs;
int DistanceDiscarded;
int AngleDiscarded;
int BorderDiscarded;
int SampleTested; // how many points have been tested
int SampleUsed; // how many points have been actually used to compute the transformation
double pcl50;
double pclhi;
double AVG;
double RMS;
double StdDev;
int Time; // Ending time of this iteration
double MinDistAbs = 0;
int DistanceDiscarded = 0;
int AngleDiscarded = 0;
int BorderDiscarded = 0;
int SampleTested = 0; // how many points have been tested
// how many points have been actually used to compute the transformation
int SampleUsed = 0;
double pcl50 = 0;
double pclhi = 0;
double AVG = 0;
double RMS = 0;
double StdDev = 0;
int Time = 0; // Ending time of this iteration
};
std::vector<IterInfo> I;

View File

@ -26,6 +26,7 @@
#define __VCG_MARCHING_CUBES
#include "mc_lookup_table.h"
#include <array>
namespace vcg
{
@ -665,14 +666,15 @@ namespace vcg
VertexPointer vp = NULL;
size_t face_idx = _mesh->face.size();
size_t v12_idx = -1;
size_t vertices_idx[3];
std::array<size_t, 3> vertices_idx;
if (v12 != NULL) v12_idx = v12 - &_mesh->vert[0];
AllocatorType::AddFaces(*_mesh, (int) n);
for (int trig=0; trig<3*n; face_idx++ )
{
vp = NULL;
memset(vertices_idx, -1, 3*sizeof(size_t));
vertices_idx.fill(-1);
//memset(vertices_idx, -1, 3*sizeof(size_t));
for (int vert=0; vert<3; vert++, trig++) //ok
{