MCPcopy Create free account
hub / github.com/ddnet/ddnet / Clean

Method Clean

src/engine/client/serverbrowser.cpp:1959–1967  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1957}
1958
1959void CFavoriteCommunityFilterList::Clean(const std::vector<CCommunity> &vAllowedCommunities)
1960{
1961 auto It = std::remove_if(m_vEntries.begin(), m_vEntries.end(), [&](const auto &Community) {
1962 return std::find_if(vAllowedCommunities.begin(), vAllowedCommunities.end(), [&](const CCommunity &AllowedCommunity) {
1963 return str_comp(Community.Id(), AllowedCommunity.Id()) == 0;
1964 }) == vAllowedCommunities.end();
1965 });
1966 m_vEntries.erase(It, m_vEntries.end());
1967}
1968
1969void CFavoriteCommunityFilterList::Save(IConfigManager *pConfigManager) const
1970{

Callers 1

CleanFiltersMethod · 0.45

Calls 8

str_compFunction · 0.85
CCommunityIdClass · 0.85
beginMethod · 0.80
endMethod · 0.80
HasCountryMethod · 0.80
HasTypeMethod · 0.80
IdMethod · 0.45
NameMethod · 0.45

Tested by

no test coverage detected