GetPriceForTimeStep(): use parameter paymentOptionIndex.

This commit is contained in:
Gerhard Hoffmann 2024-04-19 13:33:54 +02:00
parent 1fab458de3
commit d07fdd8540

View File

@ -1940,9 +1940,9 @@ QList<int> Calculator::GetTimeSteps(Configuration *cfg, int paymentOptionIndex)
return m_timeSteps[paymentOptionIndex];
}
uint32_t Calculator::GetPriceForTimeStep(Configuration *cfg, int timeStep) const {
uint32_t Calculator::GetPriceForTimeStep(Configuration *cfg, int timeStep, int paymentOptionIndex) const {
int const pop_id = cfg->getPaymentOptions().pop_id;
int const pop_id = cfg->getPaymentOptions(paymentOptionIndex).pop_id;
for (auto[itr, rangeEnd] = cfg->PaymentRate.equal_range(pop_id); itr != rangeEnd; ++itr)
{