kima2/src/core/sale.cpp
2018-07-12 13:34:17 +02:00

10 lines
No EOL
237 B
C++

#include "sale.h"
#include <numeric>
int Sale::sumInCents()
{
int test = std::accumulate(articles_.begin(), articles_.end(), 0,
[](int a, Article* b) { return a + b->getPrice(); });
return test;
}