Skip to content

Commit

Permalink
voloctree: check iterator validity to silence Coverity warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-iob committed Jun 12, 2024
1 parent bc095dd commit 8c7ce91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/voloctree/voloctree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1599,13 +1599,15 @@ VolOctree::StitchInfo VolOctree::deleteCells(const std::vector<DeleteInfo> &dele
m_cellToOctant.erase(cellId);

auto octantToCellItr = m_octantToCell.find(treeId);
assert(octantToCellItr != m_octantToCell.end());
if (octantToCellItr->second == cellId) {
m_octantToCell.erase(octantToCellItr);
}
} else {
m_cellToGhost.erase(cellId);

auto ghostToCellItr = m_ghostToCell.find(treeId);
assert(ghostToCellItr != m_ghostToCell.end());
if (ghostToCellItr->second == cellId) {
m_ghostToCell.erase(ghostToCellItr);
}
Expand Down

0 comments on commit 8c7ce91

Please sign in to comment.