Skip to content
Snippets Groups Projects
Commit fa34b15a authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

assertions for nullptr

parent 0fa75ff9
No related branches found
No related tags found
1 merge request!274Resolve "Emplace API inconsistent with ProcessorTrackerFeature/Landmark functions"
...@@ -99,21 +99,25 @@ void FactorBase::remove() ...@@ -99,21 +99,25 @@ void FactorBase::remove()
const Eigen::VectorXs& FactorBase::getMeasurement() const const Eigen::VectorXs& FactorBase::getMeasurement() const
{ {
assert(getFeature() != nullptr && "calling getMeasurement before linking with a feature");
return getFeature()->getMeasurement(); return getFeature()->getMeasurement();
} }
const Eigen::MatrixXs& FactorBase::getMeasurementCovariance() const const Eigen::MatrixXs& FactorBase::getMeasurementCovariance() const
{ {
assert(getFeature() != nullptr && "calling getMeasurementCovariance before linking with a feature");
return getFeature()->getMeasurementCovariance(); return getFeature()->getMeasurementCovariance();
} }
const Eigen::MatrixXs& FactorBase::getMeasurementSquareRootInformationUpper() const const Eigen::MatrixXs& FactorBase::getMeasurementSquareRootInformationUpper() const
{ {
assert(getFeature() != nullptr && "calling getMeasurementSquareRootInformationUpper before linking with a feature");
return getFeature()->getMeasurementSquareRootInformationUpper(); return getFeature()->getMeasurementSquareRootInformationUpper();
} }
CaptureBasePtr FactorBase::getCapture() const CaptureBasePtr FactorBase::getCapture() const
{ {
assert(getFeature() != nullptr && "calling getCapture before linking with a feature");
return getFeature()->getCapture(); return getFeature()->getCapture();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment