Skip to content

Commit

Permalink
MMVII: C++ fixes for g++ and clang++
Browse files Browse the repository at this point in the history
  • Loading branch information
meynardc committed Dec 8, 2023
1 parent 217fb95 commit e859a85
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
8 changes: 8 additions & 0 deletions MMVII/src/Matrix/cEigenDenseDecompos.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// CM: g++ reports "result: may be used uninitialized" with Eigen 3.4.0
#if defined(__GNUC__) && !defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif

#include "MMVII_Tpl_Images.h"
#include "MMVII_SysSurR.h"
Expand All @@ -7,6 +12,9 @@
#include "Eigen/Householder" // HouseholderQR.h"
// #include "Eigen/Cholesky" // HouseholderQR.h"

#if defined(__GNUC__) && !defined(__clang__)
# pragma GCC diagnostic pop
#endif
using namespace Eigen;

namespace MMVII
Expand Down
2 changes: 1 addition & 1 deletion MMVII/src/Sensors/cMetaDataImages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ class cAppli_EditCalcMetaDataImage : public cMMVII_Appli

cCollecSpecArg2007 & ArgObl(cCollecSpecArg2007 & anArgObl) override ;
cCollecSpecArg2007 & ArgOpt(cCollecSpecArg2007 & anArgOpt) override;
virtual std::vector<std::string> Samples() const; ///< For help, gives samples of "good" use
std::vector<std::string> Samples() const override; ///< For help, gives samples of "good" use


cPhotogrammetricProject mPhProj;
Expand Down
6 changes: 3 additions & 3 deletions MMVII/src/Sensors/cSensorCamPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ cSensorCamPC * cSensorCamPC::PCChangSys(cDataInvertibleMapping<tREAL8,3> & aMap)
cPt3dr aJJac ; GetCol(aJJac,aJac,1);
cPt3dr aKJac ; GetCol(aKJac,aJac,2);
static int aCpt=0;
static tREAL8 aSNorm=0;
tREAL8 aNorm = std::abs(Norm2(aIJac)-Norm2(aJJac));
//CM: unused: static tREAL8 aSNorm=0;
//CM: unused: tREAL8 aNorm = std::abs(Norm2(aIJac)-Norm2(aJJac));
aCpt++;
aSNorm += aNorm;
//CM: unused: aSNorm += aNorm;
// StdOut() << "DNorm=" << aNorm << " Avg=" << aSNorm / aCpt << std::endl;
aJac = M3x3FromCol(VUnit(aIJac),VUnit(aJJac),VUnit(aKJac));
}
Expand Down
2 changes: 1 addition & 1 deletion MMVII/src/SysCo/ChSysCoOri.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class cAppli_ChSysCoOri : public cMMVII_Appli

// Optionall Arg
cPt3dr mOrigin;
tREAL8 mZ0;
//CM: unused: tREAL8 mZ0;
tREAL8 mEpsDer ;
};

Expand Down
2 changes: 2 additions & 0 deletions MMVII/src/TieP/cIndexe2Merged.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ class cReadMTP_Std
);

cComputeMergeMulTieP * CompMerge();
bool WithSensor() const { return mWithSensor;}

private :
bool GetNextConfig();
bool mWithIndex;
Expand Down

0 comments on commit e859a85

Please sign in to comment.