delete dead floodfill

This commit is contained in:
orignal 2014-11-21 13:02:46 -05:00
parent 1c3f70056a
commit 6042aefd17
3 changed files with 11 additions and 4 deletions

View file

@ -354,11 +354,18 @@ namespace data
if (it.second->IsUnreachable ())
{
// delete RI file
if (boost::filesystem::exists (GetFilePath (fullDirectory, it.second.get ())))
{
boost::filesystem::remove (GetFilePath (fullDirectory, it.second.get ()));
deletedCount++;
}
// delete from floodfills list
if (it.second->IsFloodfill ())
{
std::unique_lock<std::mutex> l(m_FloodfillsMutex);
m_Floodfills.remove (it.second);
}
}
}
}