tests compiling, but many fail

release/4.3a0
Mike Bosse 2014-10-24 22:38:03 +02:00
parent 1fadda83e0
commit 5b2a61682d
2 changed files with 6 additions and 3 deletions

View File

@ -653,7 +653,6 @@ private:
friend class boost::serialization::access;
template<class Archive>
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_);
}

View File

@ -205,7 +205,7 @@ namespace gtsam {
Values::Values(const Values::Filtered<ValueType>& view) {
BOOST_FOREACH(const typename Filtered<ValueType>::KeyValuePair& key_value, view) {
Key key = key_value.key;
insert<ValueType>(key, key_value.value);
insert(key, static_cast<const ValueType&>(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<const GenericValue<ValueType>&>(*item->second).value_;
return static_cast<const GenericValue<ValueType>&>(*item->second).value();
} else {
return boost::none;
}
@ -293,4 +293,8 @@ namespace gtsam {
insert(j, static_cast<const Value&>(GenericValue<ValueType>(val)));
}
template <typename ValueType>
void Values::update(Key j, const ValueType& val) {
update(j, static_cast<const Value&>(GenericValue<ValueType>(val)));
}
}