Resolve "hasStateBlocks::registerStateBlocks(ProblemPtr)"
1 unresolved thread
Closes #280 (closed)
Edited by Joan Solà Ortega
Merge request reports
Activity
Filter activity
added To Do (release) label
added 1 commit
- 3431f94c - Move registerNewStateBlocks() and removeStateBlocks() to HasStateBlocks class
mentioned in commit 497299c7
- src/state_block/has_state_blocks.cpp 0 → 100644
14 } 15 } 16 17 void HasStateBlocks::removeStateBlocks(ProblemPtr _problem) 18 { 19 for (const char key : getStructure()) // note: key is a char 20 { 21 auto sbp = getStateBlock(key); 22 if (sbp != nullptr) 23 { 24 if (_problem != nullptr) 25 { 26 _problem->notifyStateBlock(sbp,REMOVE); 27 } 28 } 29 removeStateBlock(key); Shouldn't this line be in the scope of the if? If
sbp
isnullptr
, it can't be removed.. would it crash?Edited by Joan Vallvé Navarro
Please register or sign in to reply