[Fix #2] Change sort order in basket

This commit is contained in:
Martin Brodbeck 2018-10-08 09:01:28 +02:00
parent a870736d72
commit b76d1e129a

View file

@ -113,7 +113,7 @@ Seller* Marketplace::findSellerWithUuid(const std::string& uuid)
void Marketplace::addArticleToBasket(std::unique_ptr<Article> article) void Marketplace::addArticleToBasket(std::unique_ptr<Article> article)
{ {
basket_.push_back(std::move(article)); basket_.insert(basket_.begin(), std::move(article)); // article to the beginning of the basket vector
} }
size_t Marketplace::basketSize() { return basket_.size(); } size_t Marketplace::basketSize() { return basket_.size(); }