From 2eda75bd15a45b488120e482036c0d27c2be6411 Mon Sep 17 00:00:00 2001 From: Christophe Meynard Date: Mon, 13 Jan 2025 11:04:15 +0100 Subject: [PATCH] mm3d: Fix errors reported by g++ 13.3 (Ubuntu 24.04) --- src/geom3d/NuageToGrid.cpp | 5 +- src/saisieQT/HistoryManager.cpp | 95 ++++++++++++++++----------------- src/util/bicub.cpp | 6 +-- 3 files changed, 52 insertions(+), 54 deletions(-) diff --git a/src/geom3d/NuageToGrid.cpp b/src/geom3d/NuageToGrid.cpp index d8c78d6625..54394a674f 100755 --- a/src/geom3d/NuageToGrid.cpp +++ b/src/geom3d/NuageToGrid.cpp @@ -382,7 +382,10 @@ void cLoadImDist::Load(int argc,char ** argv) mPts.push_back(cPtLaser(Pt3dr(Rho,Teta,Phi))); cPtLaser & aP = mPts.back(); - for (INT aK=0; aK pts = SInfo.poly; + QVector pts = SInfo.poly; - for (int aK=0; aK < pts.size(); ++aK) - { - QDomElement Point = doc.createElement("Pt"); - QDomElement Pt3D = doc.createElement("Pt"); - QString str = QString::number(pts[aK].x(), 'f',0) + " " + QString::number(pts[aK].y(), 'f',0); + for (int aK=0; aK < pts.size(); ++aK) + { + QDomElement Point = doc.createElement("Pt"); + QDomElement Pt3D = doc.createElement("Pt"); + QString str = QString::number(pts[aK].x(), 'f',0) + " " + QString::number(pts[aK].y(), 'f',0); - t = doc.createTextNode( str ); - Point.appendChild(t); - SII.appendChild(Point); + t = doc.createTextNode( str ); + Point.appendChild(t); + SII.appendChild(Point); - //Export points 3D + //Export points 3D QVector3D pt3d; - MatrixManager *MM = new MatrixManager(); - MM->importMatrices(SInfo); - MM->getInverseProjection(pt3d, pts[aK], 0.f); + MatrixManager *MM = new MatrixManager(); + MM->importMatrices(SInfo); + MM->getInverseProjection(pt3d, pts[aK], 0.f); // str = QString::number(pt3d.x(), 'f') + " " + QString::number(pt3d.y(), 'f') + " " + QString::number(pt3d.z(), 'f'); // MPD : tentative de ne pas perdre betement de la precision qui peut etre genant avec les grande coordonnees ? str = QString::number(pt3d.x(), 'f',20) + " " + QString::number(pt3d.y(), 'f',20) + " " + QString::number(pt3d.z(), 'f',20); - t = doc2.createTextNode( str ); - Pt3D.appendChild(t); - SIt.appendChild(Pt3D); - } + t = doc2.createTextNode( str ); + Pt3D.appendChild(t); + SIt.appendChild(Pt3D); + } - t = doc.createTextNode(QString::number(SInfo.selection_mode)); - Mode.appendChild(t); - SII.appendChild(Mode); + t = doc.createTextNode(QString::number(SInfo.selection_mode)); + Mode.appendChild(t); + SII.appendChild(Mode); - t = doc2.createTextNode(QString::number(SInfo.selection_mode)); - Mode2.appendChild(t); - SIt.appendChild(Mode2); + t = doc2.createTextNode(QString::number(SInfo.selection_mode)); + Mode2.appendChild(t); + SIt.appendChild(Mode2); - SI.appendChild(SII); - SI2.appendChild(SIt); - } - else - std::cerr << "saveSelectInfos: null matrix"; + SI.appendChild(SII); + SI2.appendChild(SIt); } doc.appendChild(SI); diff --git a/src/util/bicub.cpp b/src/util/bicub.cpp index e09789772a..5fd5e88a92 100755 --- a/src/util/bicub.cpp +++ b/src/util/bicub.cpp @@ -1127,9 +1127,9 @@ cInterpolSinusCardinal::cInterpolSinusCardinal(int sizeOfWindow, bool ap template cInterpolSinusCardinal::~cInterpolSinusCardinal() { - delete m_tabX; - delete m_tabY; - delete m_tabTemp; + delete [] m_tabX; + delete [] m_tabY; + delete [] m_tabTemp; }