Skip to content

Commit

Permalink
Fix GCC 13 build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold856 committed Jan 21, 2025
1 parent d5f304e commit 1f89665
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/TriangulationLOSTExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ int main(int argc, char* argv[]) {

double rank_tol = 1e-9;
std::shared_ptr<Cal3_S2> calib = std::make_shared<Cal3_S2>();
std::chrono::nanoseconds durationDLT;
std::chrono::nanoseconds durationDLTOpt;
std::chrono::nanoseconds durationLOST;
std::chrono::nanoseconds durationDLT{};
std::chrono::nanoseconds durationDLTOpt{};
std::chrono::nanoseconds durationLOST{};

for (int i = 0; i < nrTrials; i++) {
Point2Vector noisyMeasurements =
Expand Down
4 changes: 3 additions & 1 deletion gtsam/geometry/BearingRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ struct BearingRange {
TangentVector localCoordinates(const BearingRange& other) const {
typename traits<B>::TangentVector v1 = traits<B>::Local(bearing_, other.bearing_);
typename traits<R>::TangentVector v2 = traits<R>::Local(range_, other.range_);
// Set the first dimB elements to v1, and the next dimR elements to v2
TangentVector v;
v << v1, v2;
v.template head<dimB>() = v1;
v.template tail<dimR>(dimB) = v2;
return v;
}

Expand Down
4 changes: 4 additions & 0 deletions gtsam/geometry/FundamentalMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#include <gtsam/geometry/FundamentalMatrix.h>
#include <gtsam/geometry/Point2.h>

#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif

namespace gtsam {

//*************************************************************************
Expand Down

0 comments on commit 1f89665

Please sign in to comment.