コード例 #1
0
void CBugTraqAssociations::RemoveByPath(const CTGitPath &path)
{
	inner_t::iterator it = std::find_if(m_inner.begin(), m_inner.end(), FindByPathPred(path));
	if (it != m_inner.end())
	{
		delete *it;
		m_inner.erase(it);
	}
}
コード例 #2
0
bool CBugTraqAssociations::FindProviderForPath(const CTGitPath& path, CBugTraqAssociation *assoc) const
{
		inner_t::const_iterator it = std::find_if(m_inner.begin(), m_inner.end(), FindByPathPred(path));
		if (it != m_inner.end())
		{
			*assoc = *(*it);
			return true;
		}

	return false;
}
コード例 #3
0
bool CBugTraqAssociations::FindProviderForPath(CTGitPath path, CBugTraqAssociation *assoc) const
{
	do
	{
		inner_t::const_iterator it = std::find_if(m_inner.begin(), m_inner.end(), FindByPathPred(path));
		if (it != m_inner.end())
		{
			*assoc = *(*it);
			return true;
		}

		path = path.GetContainingDirectory();
	} while(!path.IsEmpty());

	return false;
}