sorting sellers

This commit is contained in:
Martin Brodbeck 2018-07-18 09:00:46 +02:00
parent f5ba2f6014
commit de95d5f341
5 changed files with 17 additions and 1 deletions

View file

@ -41,4 +41,9 @@ int Marketplace::getNumSellersDelete()
int count = std::count_if(sellers_.begin(), sellers_.end(),
[](const auto& a) { return a->getState() == Seller::State::DELETE; });
return count;
}
void Marketplace::sortSellers()
{
std::sort(sellers_.begin(), sellers_.end());
}