From 06eb801526c67c97465e4bb5d0ce468645ffac0f Mon Sep 17 00:00:00 2001 From: dellaert Date: Mon, 10 Nov 2014 16:43:49 +0100 Subject: [PATCH] Added virtual destructor: for some reason if I remove virtual methods the unit tests fail... --- gtsam.h | 8 +++++++- gtsam/geometry/EssentialMatrix.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gtsam.h b/gtsam.h index b5f121ce1..c42dadec2 100644 --- a/gtsam.h +++ b/gtsam.h @@ -1682,7 +1682,6 @@ class Values { gtsam::Cal3DS2}> void insert(size_t j, const T& value); void insert(const gtsam::Values& values); - void update(size_t j, const gtsam::Value& val); void update(const gtsam::Values& values); void erase(size_t j); void swap(gtsam::Values& values); @@ -1698,6 +1697,13 @@ class Values { // enabling serialization functionality void serialize() const; + + // New in 4.0, we have to specialize every insert/update to generate wrappers + // Instead of the old: + // void insert(size_t j, const gtsam::Value& value); + // void update(size_t j, const gtsam::Value& val); + void insert(size_t j, const gtsam::Pose2& t); + void update(size_t j, const gtsam::Pose2& t); }; // Actually a FastList diff --git a/gtsam/geometry/EssentialMatrix.h b/gtsam/geometry/EssentialMatrix.h index e23b22093..8763504c0 100644 --- a/gtsam/geometry/EssentialMatrix.h +++ b/gtsam/geometry/EssentialMatrix.h @@ -58,6 +58,8 @@ public: return EssentialMatrix(Rot3::Random(rng), Unit3::Random(rng)); } + virtual ~EssentialMatrix() {} + /// @} /// @name Testable