From 5b2a61682d99ebe09a331cf02ef0a72c7accea20 Mon Sep 17 00:00:00 2001 From: Mike Bosse Date: Fri, 24 Oct 2014 22:38:03 +0200 Subject: [PATCH] tests compiling, but many fail --- gtsam/geometry/PinholeCamera.h | 1 - gtsam/nonlinear/Values-inl.h | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gtsam/geometry/PinholeCamera.h b/gtsam/geometry/PinholeCamera.h index a6c1c6f42..aa42b638f 100644 --- a/gtsam/geometry/PinholeCamera.h +++ b/gtsam/geometry/PinholeCamera.h @@ -653,7 +653,6 @@ private: friend class boost::serialization::access; template void serialize(Archive & ar, const unsigned int version) { - ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Value); ar & BOOST_SERIALIZATION_NVP(pose_); ar & BOOST_SERIALIZATION_NVP(K_); } diff --git a/gtsam/nonlinear/Values-inl.h b/gtsam/nonlinear/Values-inl.h index 11c44cad4..76d47b429 100644 --- a/gtsam/nonlinear/Values-inl.h +++ b/gtsam/nonlinear/Values-inl.h @@ -205,7 +205,7 @@ namespace gtsam { Values::Values(const Values::Filtered& view) { BOOST_FOREACH(const typename Filtered::KeyValuePair& key_value, view) { Key key = key_value.key; - insert(key, key_value.value); + insert(key, static_cast(key_value.value)); } } @@ -281,7 +281,7 @@ namespace gtsam { throw ValuesIncorrectType(j, typeid(*item->second), typeid(ValueType)); // We have already checked the type, so do a "blind" static_cast, not dynamic_cast - return static_cast&>(*item->second).value_; + return static_cast&>(*item->second).value(); } else { return boost::none; } @@ -293,4 +293,8 @@ namespace gtsam { insert(j, static_cast(GenericValue(val))); } + template + void Values::update(Key j, const ValueType& val) { + update(j, static_cast(GenericValue(val))); + } }