From 692959f0f31a6bfbaa29e8d814a6c51d4f16d490 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Sun, 2 Jun 2019 17:48:24 -0400 Subject: [PATCH] Fix for issue #38 (gcc specific issue, but fix works for all) --- gtsam_unstable/slam/SmartRangeFactor.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gtsam_unstable/slam/SmartRangeFactor.h b/gtsam_unstable/slam/SmartRangeFactor.h index b3d71d05f..c90a9646f 100644 --- a/gtsam_unstable/slam/SmartRangeFactor.h +++ b/gtsam_unstable/slam/SmartRangeFactor.h @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -89,7 +88,6 @@ class SmartRangeFactor: public NoiseModelFactor { * Raise runtime_error if not well defined. */ Point2 triangulate(const Values& x) const { - // gttic_(triangulate); // create n circles corresponding to measured range around each pose std::list circles; size_t n = size(); @@ -100,7 +98,7 @@ class SmartRangeFactor: public NoiseModelFactor { Circle2 circle1 = circles.front(); boost::optional best_fh; - boost::optional bestCircle2; + auto bestCircle2 = boost::make_optional(false, circle1); // fixes issue #38 // loop over all circles for (const Circle2& it : circles) { @@ -136,7 +134,6 @@ class SmartRangeFactor: public NoiseModelFactor { } else { throw std::runtime_error("triangulate failed"); } - // gttoc_(triangulate); } /**