diff --git a/examples/TriangulationLOSTExample.cpp b/examples/TriangulationLOSTExample.cpp index 417c37c459..52744e508b 100644 --- a/examples/TriangulationLOSTExample.cpp +++ b/examples/TriangulationLOSTExample.cpp @@ -123,9 +123,9 @@ int main(int argc, char* argv[]) { double rank_tol = 1e-9; std::shared_ptr calib = std::make_shared(); - 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 = diff --git a/gtsam/geometry/BearingRange.h b/gtsam/geometry/BearingRange.h index 9c4e42edf8..260a509eb3 100644 --- a/gtsam/geometry/BearingRange.h +++ b/gtsam/geometry/BearingRange.h @@ -138,8 +138,10 @@ struct BearingRange { TangentVector localCoordinates(const BearingRange& other) const { typename traits::TangentVector v1 = traits::Local(bearing_, other.bearing_); typename traits::TangentVector v2 = traits::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() = v1; + v.template tail(dimB) = v2; return v; } diff --git a/gtsam/geometry/FundamentalMatrix.cpp b/gtsam/geometry/FundamentalMatrix.cpp index 837ba72632..c920db3ab5 100644 --- a/gtsam/geometry/FundamentalMatrix.cpp +++ b/gtsam/geometry/FundamentalMatrix.cpp @@ -9,6 +9,10 @@ #include #include +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + namespace gtsam { //*************************************************************************