* Get the sum of shipment orders from the base (economy). * @param from - 0-7 for bases, 8 for economy * @param exclude - 0-7 for bases, 8 for economy, -1 don't exclude (by default) * @return - sum of shipment orders */
| 817 | * @return - sum of shipment orders |
| 818 | */ |
| 819 | int TransactionControl::Trade::shipmentsFrom(const int from, const int exclude) const |
| 820 | { |
| 821 | int total = 0; |
| 822 | if (shipments.find(from) != shipments.end()) |
| 823 | { |
| 824 | for (auto &s : shipments.at(from)) |
| 825 | { |
| 826 | if (s.first != exclude && s.second > 0) |
| 827 | { |
| 828 | total += s.second; |
| 829 | } |
| 830 | } |
| 831 | } |
| 832 | return total; |
| 833 | } |
| 834 | |
| 835 | /** |
| 836 | * Get total shipment orders from(+) and to(-) the base (economy). |
no test coverage detected