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

check state includes structure and take only structure states

parent ae848b3a
No related branches found
No related tags found
1 merge request!414Resolve "IsMotion used in Problem::getState()"
...@@ -21,13 +21,11 @@ FrameBase::FrameBase(const TimeStamp& _ts, ...@@ -21,13 +21,11 @@ FrameBase::FrameBase(const TimeStamp& _ts,
frame_id_(++frame_id_count_), frame_id_(++frame_id_count_),
time_stamp_(_ts) time_stamp_(_ts)
{ {
for (const auto& pair_key_vec : _state) assert(_state.includesStructure(_frame_structure) && "_state does not include all keys of _frame_structure");
{
const auto& key = pair_key_vec.first;
const auto& vec = pair_key_vec.second;
StateBlockPtr sb = FactoryStateBlock::create(string(1,key), vec, false); // false = non fixed
for (auto key : getStructure())
{
StateBlockPtr sb = FactoryStateBlock::create(string(1,key), _state.at(key), false); // false = non fixed
addStateBlock(key, sb, getProblem()); addStateBlock(key, sb, getProblem());
} }
} }
......
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