Skip to content
Snippets Groups Projects
Commit 050558b1 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Fis offending casse with an assert

parent 921f43b0
No related branches found
No related tags found
1 merge request!377Resolve "Fix Problem::getState() and getState(ts)"
...@@ -301,9 +301,9 @@ inline VectorXd HasStateBlocks::getStateVector(const StateStructure& _sub_struct ...@@ -301,9 +301,9 @@ inline VectorXd HasStateBlocks::getStateVector(const StateStructure& _sub_struct
for (const char key : structure) for (const char key : structure)
{ {
const auto& sb = getStateBlock(key); const auto& sb = getStateBlock(key);
if (!sb){
WOLF_ERROR("Stateblock key ", key, " not in the structure"); assert(sb != nullptr && "Requested StateBlock key not in the structure");
}
state.segment(index,sb->getSize()) = sb->getState(); state.segment(index,sb->getSize()) = sb->getState();
index += sb->getSize(); index += sb->getSize();
} }
......
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