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

added assertion in setStateBlockPtrStatic out of range

parent 193657ce
No related branches found
No related tags found
1 merge request!243Constraint prior sensor params
This commit is part of merge request !243. Comments created here will be created in the context of that merge request.
...@@ -235,6 +235,7 @@ inline StateBlockPtr SensorBase::getStateBlockPtrStatic(unsigned int _i) const ...@@ -235,6 +235,7 @@ inline StateBlockPtr SensorBase::getStateBlockPtrStatic(unsigned int _i) const
inline void SensorBase::setStateBlockPtrStatic(unsigned int _i, const StateBlockPtr _sb_ptr) inline void SensorBase::setStateBlockPtrStatic(unsigned int _i, const StateBlockPtr _sb_ptr)
{ {
assert (_i < state_block_vec_.size() && "Setting a state block pointer out of the vector range!");
assert((params_prior_map_.find(_i) == params_prior_map_.end() || _sb_ptr == nullptr) && "overwriting a state block that has an absolute constraint"); assert((params_prior_map_.find(_i) == params_prior_map_.end() || _sb_ptr == nullptr) && "overwriting a state block that has an absolute constraint");
state_block_vec_[_i] = _sb_ptr; state_block_vec_[_i] = _sb_ptr;
} }
......
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