Exemplo n.º 1
0
void DirectoryListing::Directory::filterList(DirectoryListing::Directory::TTHSet& l)
{
	for (auto i = directories.cbegin(); i != directories.cend(); ++i)
	{
		(*i)->filterList(l);
	}
	directories.erase(std::remove_if(directories.begin(), directories.end(), DirectoryEmpty()), directories.end());
	m_files.erase(std::remove_if(m_files.begin(), m_files.end(), HashContained(l)), m_files.end());
}
void DirectoryListing::Directory::filterList(DirectoryListing::Directory::TTHSet& l) {
    for(Iter i = directories.begin(); i != directories.end(); ++i) (*i)->filterList(l);
    directories.erase(std::remove_if(directories.begin(),directories.end(),DirectoryEmpty()),directories.end());
    files.erase(std::remove_if(files.begin(),files.end(),HashContained(l)),files.end());
}