GetPriceForTimeStep(): use parameter paymentOptionIndex.
This commit is contained in:
parent
1fab458de3
commit
d07fdd8540
@ -1940,9 +1940,9 @@ QList<int> Calculator::GetTimeSteps(Configuration *cfg, int paymentOptionIndex)
|
|||||||
return m_timeSteps[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)
|
for (auto[itr, rangeEnd] = cfg->PaymentRate.equal_range(pop_id); itr != rangeEnd; ++itr)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user