Skip to content
Snippets Groups Projects
Commit b346f405 authored by Markus Holzer's avatar Markus Holzer
Browse files

Merge branch 'suffa/clearBlockDataFix' into 'master'

Also erase the element in blockDataItem_ when clearing Block Data in the BlockStorage.

See merge request walberla/walberla!656
parents 50a01d70 72a58482
No related merge requests found
......@@ -723,6 +723,12 @@ inline void BlockStorage::clearBlockData( const BlockDataID & id )
{
for( auto block = begin(); block != end(); ++block )
block->deleteData( id );
//also delete block data from data handling vector
auto elementToErase = std::remove_if(blockDataItem_.begin(), blockDataItem_.end(),
[id](const internal::BlockDataItem& dataItem)
{ return dataItem.getId() == id; });
blockDataItem_.erase(elementToErase, blockDataItem_.end());
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment