Skip to content

Commit

Permalink
MMVII: Remove some unused variables (clang++-18)
Browse files Browse the repository at this point in the history
  • Loading branch information
meynardc committed Dec 6, 2024
1 parent 45eac7f commit 2d71073
Show file tree
Hide file tree
Showing 18 changed files with 7 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,9 @@ struct sparse_solve_triangular_sparse_selector<Lhs,Rhs,Mode,UpLo,ColMajor>
}


Index count = 0;
// FIXME compute a reference value to filter zeros
for (typename AmbiVector<Scalar,StorageIndex>::Iterator it(tempVector/*,1e-12*/); it; ++it)
{
++ count;
// std::cerr << "fill " << it.index() << ", " << col << "\n";
// std::cout << it.value() << " ";
// FIXME use insertBack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ void SparseLUImpl<Scalar,StorageIndex>::heap_relax_snode (const Index n, IndexVe
// Identify the relaxed supernodes by postorder traversal of the etree
Index snode_start; // beginning of a snode
StorageIndex k;
Index nsuper_et_post = 0; // Number of relaxed snodes in postordered etree
Index nsuper_et = 0; // Number of relaxed snodes in the original etree
[[maybe_unused]] Index nsuper_et_post = 0; // Number of relaxed snodes in postordered etree
[[maybe_unused]] Index nsuper_et = 0; // Number of relaxed snodes in the original etree
StorageIndex l;
for (j = 0; j < n; )
{
Expand Down
2 changes: 1 addition & 1 deletion MMVII/src/Appli/cMMVII_Appli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1727,7 +1727,7 @@ cParamCallSys cMMVII_Appli::StrCallMMVII

// std::string aComGlob = mFullBin + " ";
aRes.AddArgs(mFullBin);
int aNbSubst=0;
[[maybe_unused]] int aNbSubst=0;
std::vector<bool> aVUsedSubst(aSubst.V().size(),false);
/*
cSpecMMVII_Appli* aSpec = cSpecMMVII_Appli::SpecOfName(aCom2007,false); // false => dont accept no match
Expand Down
2 changes: 0 additions & 2 deletions MMVII/src/CodedTarget/cCdts_CheckBoardTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ cCdRadiom::cCdRadiom
mCostCorrel (2.001), // over maximal theoreticall value
mRatioBW (0)
{
static int aCpt=0 ; aCpt++;

int aNbIn0=0,aNbIn1=0;

cMatIner2Var<tREAL8> aCorGrayAll;
Expand Down
6 changes: 1 addition & 5 deletions MMVII/src/CodedTarget/cCheckBoardTargetExtract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void cAppliCheckBoardTargetExtract::SetLabel(const cPt2dr& aPt,tU_INT1 aLabel)
cCdRadiom cAppliCheckBoardTargetExtract::MakeCdtRadiom(cScoreTetaLine & aSTL,const cCdSym & aCdSym,tREAL8 aThickness)
{
bool IsMarqed = IsPtTest(aCdSym.mC);
static int aCptGlob=0 ; aCptGlob++;
// static int aCptGlob=0 ; aCptGlob++;
static int aCptMarq=0 ; if (IsMarqed) aCptMarq++;
DebugCB = (aCptMarq == mNumDebugMT) && IsMarqed;

Expand Down Expand Up @@ -431,15 +431,13 @@ void cAppliCheckBoardTargetExtract::ComputeTopoSadles()
// select 1 point in conected component

cAutoTimerSegm aTSMaxCC(mTimeSegm,"2.1-MaxCCSad");
int aNbCCSad=0;
std::vector<cPt2di> aVCC;
const std::vector<cPt2di> & aV8 = Alloc8Neighbourhood();

for (const auto& aPix : *mDImLabel)
{
if (mDImLabel->GetV(aPix)==eTopo0)
{
aNbCCSad++;
ConnectedComponent(aVCC,*mDImLabel,aV8,aPix,eTopo0,eTopoTmpCC);
cWhichMax<cPt2di,tREAL8> aBestPInCC;
for (const auto & aPixCC : aVCC)
Expand Down Expand Up @@ -664,7 +662,6 @@ void cAppliCheckBoardTargetExtract::DoOneImageAndScale(tREAL8 aScale,const tIm
int aNbEllWCode = 0;
cAutoTimerSegm aTSEllipse(mTimeSegm,"Ellipse");
{
int aCpt=0;
for (const auto & aCdtRad : aVCdtRad)
{
std::vector<bool> TryCE = {false}; // Do we do the try in circle or ellipse mode
Expand All @@ -688,7 +685,6 @@ void cAppliCheckBoardTargetExtract::DoOneImageAndScale(tREAL8 aScale,const tIm
AddCdtE(aCDE);
}
}
aCpt++;
}
}

Expand Down
2 changes: 1 addition & 1 deletion MMVII/src/Geom2D/Delaunay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ Delaunator::Delaunator(SafeVector<double> const& in_coords)

hull_start = i0;

size_t hull_size = 3;
[[maybe_unused]] size_t hull_size = 3;

hull_next[i0] = hull_prev[i2] = i1;
hull_next[i1] = hull_prev[i0] = i2;
Expand Down
4 changes: 0 additions & 4 deletions MMVII/src/Geom3D/cZBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,10 @@ cZBuffer::cZBuffer(cTri3DIterator & aMesh,const tSet & aSetIn,const tMap & aMap
cPt3dr aPIn;

mMesh.ResetAll();
int aCptTot=0;
int aCptIn=0;
while (mMesh.GetNextPoint(aPIn))
{
aCptTot++;
if (mSetIn.InsideWithBox(aPIn))
{
aCptIn++;
cPt3dr aPOut = mMapI2O.Value(aPIn);

if (mSetOut.InsideWithBox(aPOut))
Expand Down
2 changes: 1 addition & 1 deletion MMVII/src/Geoms/TilesIndexGeom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ void OneBenchSpatialIndex()
aVerif2.Add(aPt->GetPrimGeom(),aDistSegPt);
}

int aNbIn=0;
[[maybe_unused]] int aNbIn=0;
for (const auto & aPt : aLPt)
{
tREAL8 aDistSegPt = aSeg.Seg().DistClosedSeg(aPt) ;
Expand Down
4 changes: 0 additions & 4 deletions MMVII/src/ImagesInfoExtract/InfoPonctuelles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ double CubGaussWeightStandardDev(const cDataIm2D<Type> &anIm,const cPt2di& aC,d
double aSqRad = Square(aRadius);
cUB_ComputeStdDev<1> aCSD;

int aNbOk = 0;


for (const auto & aDP : aDBox)
{
double aN2 = SqN2(aDP); // Square norm of displacement
Expand All @@ -23,7 +20,6 @@ double CubGaussWeightStandardDev(const cDataIm2D<Type> &anIm,const cPt2di& aC,d
cPt2di aP = aC + aDP;
if (anIm.Inside(aP))
{
aNbOk++;
double aRatio = std::sqrt(aN2) / aRadius;
double aWeight = CubAppGaussVal(aRatio);
double aVal = anIm.GetV(aP);
Expand Down
2 changes: 0 additions & 2 deletions MMVII/src/ImagesInfoExtract/cAppliExtractLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,14 +510,12 @@ void cAppliExtractLine::MakeVisu(const std::string & aNameIm)
if (mGenVisu>=3)
{
cRGBImage aVisAccum = RGBImFromGray(aDAccum,255.0/aVMax);
int aK=0;
for (const auto & aPS : mVPS)
{
//aVisAccum.SetRGBrectWithAlpha(ToI(aPS->IndTetaRho()) ,15,cRGBImage::Red,0.5);
cPt2dr aC=aPS.IndTetaRho();
cPt2dr aSz(7,7);
aVisAccum.FillRectangle(cRGBImage::Red,ToI(aC-aSz),ToI(aC+aSz),cPt3dr(0.5,1.0,1.0));
aK++;
}
aVisAccum.ToJpgFileDeZoom(mPhProj.DirVisuAppli() + "Accum_" + aNameTif,1);
aDAccum.ToFile(mPhProj.DirVisuAppli() + "RawAccum_" + aNameTif);
Expand Down
1 change: 0 additions & 1 deletion MMVII/src/ImagesInfoExtract/cHoughTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ void ShowImProfile(const cDataIm1D<tREAL8> & anIm,const std::string & aName)
void cParalLine::ComputeRadiomHomog(const cDataGenUnTypedIm<2> & anIm,cPerspCamIntrCalib * aCalib,const std::string & aNameFile)
{
// StdOut() << "aNameFileaNameFileaNameFileaNameFile " << aNameFile << "\n";
static int aCPT=0; aCPT++;

cSegment2DCompiled<tREAL8> aSegFull = aCalib->ExtenSegUndistIncluded(false,mMidleSeg,0.05,1.0,5.0);

Expand Down
3 changes: 0 additions & 3 deletions MMVII/src/LearningMatching/FillCubeCostMatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,6 @@ int cAppliFillCubeCost::Exe()
cPt2di aSz = aDZMin.Sz();
cPt2di aPix;

int aCpt=0;

for (aPix.y()=0 ; aPix.y()<aSz.y() ; aPix.y()++)
{
StdOut() << "Line " << aPix.y() << " on " << aSz.y() << std::endl;
Expand All @@ -496,7 +494,6 @@ int cAppliFillCubeCost::Exe()
bool aTabOk[2];
for (int aK=0 ; aK<int(aVMods.size()) ; aK++)
aTabCost[aK] = aVMods[aK]->ComputeCost(aTabOk[aK],aPC1,aPC20,aDz);
aCpt++;
PushCost(aTabCost[0]);

if (mCmpCorLearn && aTabOk[0] && aTabOk[1])
Expand Down
1 change: 0 additions & 1 deletion MMVII/src/PoseEstim/CalibratedSpaceResection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ template <class Type> cIsometry3D<Type> cElemSpaceResection<Type>::BC2Pose(const

template <class Type> void cElemSpaceResection<Type>::OneTestCorrectness()
{
static int aCpt=0; aCpt++;
{
// generate 3 bundle not too degenared => 0,P0,P1,P2 cot coplanar
cTriangle<Type,3> aTriBund = RandomTetraTriangRegul<Type>(1e-2,1e2);
Expand Down
6 changes: 0 additions & 6 deletions MMVII/src/Sensors/cSensorCamPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,6 @@ cSensorCamPC * cSensorCamPC::PCChangSys(cDataInvertibleMapping<tREAL8,3> & aMap)
cPt3dr aIJac ; GetCol(aIJac,aJac,0);
cPt3dr aJJac ; GetCol(aJJac,aJac,1);
cPt3dr aKJac ; GetCol(aKJac,aJac,2);
static int aCpt=0;
//CM: unused: static tREAL8 aSNorm=0;
//CM: unused: tREAL8 aNorm = std::abs(Norm2(aIJac)-Norm2(aJJac));
aCpt++;
//CM: unused: aSNorm += aNorm;
// StdOut() << "DNorm=" << aNorm << " Avg=" << aSNorm / aCpt << std::endl;
aJac = M3x3FromCol(VUnit(aIJac),VUnit(aJJac),VUnit(aKJac));
}
cDenseMatrix<tREAL8> aNewMatNonR = aJac * Pose().Rot().Mat();
Expand Down
2 changes: 0 additions & 2 deletions MMVII/src/TestLibsExtern/MarketIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,9 @@ bool saveMarket(const SparseMatrixType& mat, const std::string& filename)
out.flags(std::ios_base::scientific);
out.precision(64);
out << mat.rows() << " " << mat.cols() << " " << mat.nonZeros() << "\n";
int count = 0;
for(int j=0; j<mat.outerSize(); ++j)
for(typename SparseMatrixType::InnerIterator it(mat,j); it; ++it)
{
++ count;
out << it.row()+1 << " " << it.col()+1 << " " << it.value() << "\n";
}
out.close();
Expand Down
2 changes: 1 addition & 1 deletion MMVII/src/TieP/cToTiePMultiple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ void OneBench(int aNbImage,int aNbPts,int aMaxCard,bool DoIt)
cSimulHom aSimH(aNbImage,aNbPts,aMaxCard,false);
cComputeMergeMulTieP aSetMTP1(aSimH.VNames());

int aCptErr = 0;
[[maybe_unused]] int aCptErr = 0;
for (int aKPts=0 ; aKPts<aNbPts ; aKPts++)
{
cMultiplePt aMTP = aSimH.GenMulTieP();
Expand Down
3 changes: 0 additions & 3 deletions include/im_tpl/algo_cc.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ template <class T1,class T2,class Action> int OneZC
aVCur->push_back(aPGerm);
aOnNewPt.OnNewPt(aPGerm);
}
int aNbStep = 1;

int aNbTot = 0;
while (! aVCur->empty())
{
Expand All @@ -100,7 +98,6 @@ template <class T1,class T2,class Action> int OneZC

ElSwap(aVNext,aVCur);
aVNext->clear();
aNbStep++;
}

return aNbTot;
Expand Down
3 changes: 0 additions & 3 deletions include/im_tpl/impainting.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ template <class Type,class Type_Base>

for (int aKIter=0 ; aKIter< 6 ; aKIter++)
{
int aNbUpdate = 0;
bool Pair= ((aKIter%2)==0);

int IndDeb = Pair ? 0 : (mNbPts-1);
Expand All @@ -133,14 +132,12 @@ template <class Type,class Type_Base>
{
aZMin = aZAugm;
aValOfZMin = (Type)mTImVal.get(aPVois);
aNbUpdate++;
}
}
}
mTImVal.oset(aP2Cur,aValOfZMin);
mTImBuf.oset(aP2Cur,aZMin);
}
// std::cout << "NNNbUodta " << aNbUpdate << "\n";
}
}

Expand Down

0 comments on commit 2d71073

Please sign in to comment.