Skip to content

Commit

Permalink
removed some unused variable warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
malomo committed Nov 22, 2023
1 parent 8c96999 commit 58326f8
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 8 deletions.
5 changes: 5 additions & 0 deletions vcg/complex/algorithms/bitquad_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,10 @@ static ScalarType EdgeLenghtVariationIfVertexRotated(const FaceType &f, int w0)
pf = t;
guard++;
assert(guard<100);
(void)guard;
} while (pf != &f);
assert (na == n);
(void)n; (void)na;
return (after-before);
}

Expand Down Expand Up @@ -295,6 +297,7 @@ static ScalarType QuadQualityVariationIfVertexRotated(const FaceType &f, int w0)
pf = t;
guard++;
assert(guard<100);
(void)guard;
} while (pf != &f);

assert(s.size()%2==0);
Expand Down Expand Up @@ -618,6 +621,7 @@ static bool IsDoubletFF(const FaceType& f, int wedge){
pf = t;
guard++;
assert(guard<100);
(void)guard;
} while (pf != &f);
return (res == 2);
}
Expand Down Expand Up @@ -655,6 +659,7 @@ static bool IsSingletFF(const FaceType& f, int wedge){
pf = t;
guard++;
assert(guard<100);
(void)guard;
} while (pf != &f);
return (res == 1);
}
Expand Down
1 change: 1 addition & 0 deletions vcg/complex/algorithms/clean.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ class Clean
count_fd++;
Allocator<MeshType>::DeleteFace(m,*fi);
}
(void)count_fd;
return count_vd;
}

Expand Down
6 changes: 2 additions & 4 deletions vcg/complex/algorithms/refine.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ bool RefineE(MESH_TYPE &m, MIDPOINT &mid, EDGEPRED &ep,bool RefineSelected=false
TexCoordType wtt[6]; // per ogni faccia sono al piu' tre i nuovi valori
// di texture per wedge (uno per ogni edge)

int fca=0;
for(fi=m.face.begin();fi!=oldendf;++fi) if(!(*fi).IsD())
{
if(cb && (++step%PercStep)==0)
Expand All @@ -460,7 +459,7 @@ bool RefineE(MESH_TYPE &m, MIDPOINT &mid, EDGEPRED &ep,bool RefineSelected=false
nf[0]=&*fi;
int i;
for(i=1;i<SplitTab[ind].TriNum;++i){
nf[i]=&*lastf; ++lastf; fca++;
nf[i]=&*lastf; ++lastf;
if(RefineSelected || (*fi).IsS()) (*nf[i]).SetS();
nf[i]->ImportData(*fi);
// if(tri::HasPerFaceColor(m))
Expand Down Expand Up @@ -1184,7 +1183,6 @@ bool RefineMidpoint(MESH_TYPE &m, EDGEPRED &ep, bool RefineSelected=false, CallB
TexCoordType wtt[6]; // per ogni faccia sono al piu' tre i nuovi valori
// di texture per wedge (uno per ogni edge)

int fca=0;
for(fi=m.face.begin();fi!=oldendf;++fi) if(!(*fi).IsD())
{
if(cb && (++step%PercStep)==0)
Expand All @@ -1201,7 +1199,7 @@ bool RefineMidpoint(MESH_TYPE &m, EDGEPRED &ep, bool RefineSelected=false, CallB
nf[0]=&*fi;
int i;
for(i=1;i<SplitTab[ind].TriNum;++i){
nf[i]=&*lastf; ++lastf; fca++;
nf[i]=&*lastf; ++lastf;
if(RefineSelected || (*fi).IsS()) (*nf[i]).SetS();
nf[i]->ImportData(*fi);

Expand Down
6 changes: 3 additions & 3 deletions vcg/complex/algorithms/update/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ static void TetraTetra (MeshType & m)
FillFaceVector(m, fvec);
std::sort(fvec.begin(), fvec.end());

int nf = 0;
typename std::vector<PFace>::iterator pback, pfront;
pback = fvec.begin();
pfront = fvec.begin();
Expand All @@ -369,7 +368,6 @@ static void TetraTetra (MeshType & m)
(*q).t->TTp(q->z) = pback->t;
(*q).t->TTi(q->z) = pback->z;
pback = pfront;
++nf;
}
if (pfront == fvec.end()) break;
++pfront;
Expand Down Expand Up @@ -610,7 +608,8 @@ static void TestVertexEdge(MeshType &m)
for(edge::VEIterator<EdgeType> vei(&*vi);!vei.End();++vei)
cnt++;
assert((numVertex[tri::Index(m,*vi)] == 0) == (vi->VEp()==0) );
assert(cnt==numVertex[tri::Index(m,*vi)]);
assert(cnt==numVertex[tri::Index(m,*vi)]);
(void)cnt;
}
}
}
Expand Down Expand Up @@ -652,6 +651,7 @@ static void TestVertexFace(MeshType &m)
++VFi;
}
assert(num==numVertex[&(*vi)]);
(void)num;
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion vcg/simplex/face/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ bool FFCorrectness(FaceType & f, const int e)
if(curFace.IsBorder()) return false;
curFace.NextF();
cnt++;
assert(cnt<100);
assert(cnt<100);
(void)cnt;
}
while ( curFace.f != &f);
return true;
Expand Down Expand Up @@ -270,6 +271,7 @@ void FFDetach(FaceType & f, const int e)
LastFace.NextF();
cnt++;
assert(cnt<100);
(void)cnt;
}

assert(LastFace.f->FFp(LastFace.z)==&f);
Expand Down
2 changes: 2 additions & 0 deletions wrap/io_trimesh/export_ply.h
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,7 @@ class ExporterPLY
}
}
assert(fcnt==m.fn);
(void)fcnt;
int eauxvv[2];
if( pi.mask & Mask::IOM_EDGEINDEX )
{
Expand All @@ -891,6 +892,7 @@ class ExporterPLY
}
}
assert(ecnt==m.en);
(void)ecnt;
}
int result = 0;
if (ferror(fpout)) result = ply::E_STREAMERROR;
Expand Down
2 changes: 2 additions & 0 deletions wrap/io_trimesh/import_obj.h
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,8 @@ class ImporterOBJ
} // end for each line...
} // end while stream not eof
assert((numTriangles +numVertices) == numVerticesPlusFaces+extraTriangles);
(void)extraTriangles;
(void)numTexCoords;
vcg::tri::Allocator<OpenMeshType>::AddFaces(m,numTriangles);

// Add found edges
Expand Down
1 change: 1 addition & 0 deletions wrap/io_trimesh/import_stl.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ static int OpenBinary( OpenMeshType &m, const char * filename, int &loadMask, Ca
}
}
fclose(fp);
(void)lineCnt;
return E_NOERROR;
}
}; // end class
Expand Down

0 comments on commit 58326f8

Please sign in to comment.