Added helpers GetPriceForStep() and GetStepForPrice() to make source
more readable.
This commit is contained in:
parent
63f508fb95
commit
723b3530cc
@ -80,7 +80,13 @@ private:
|
|||||||
|
|
||||||
//
|
//
|
||||||
uint32_t GetPriceForTimeStep(Configuration *cfg, int timeStep) const;
|
uint32_t GetPriceForTimeStep(Configuration *cfg, int timeStep) const;
|
||||||
|
uint32_t GetPriceForStep(Configuration *cfg, int step) const {
|
||||||
|
return GetPriceForTimeStep(cfg, step);
|
||||||
|
}
|
||||||
uint32_t GetDurationForPrice(Configuration *cfg, int price) const;
|
uint32_t GetDurationForPrice(Configuration *cfg, int price) const;
|
||||||
|
uint32_t GetStepForPrice(Configuration *cfg, int price) const {
|
||||||
|
return GetDurationForPrice(cfg, price);
|
||||||
|
}
|
||||||
|
|
||||||
int findWorkTimeRange(QDateTime const &dt,
|
int findWorkTimeRange(QDateTime const &dt,
|
||||||
QScopedArrayPointer<TariffTimeRange> const &worktime,
|
QScopedArrayPointer<TariffTimeRange> const &worktime,
|
||||||
|
Loading…
Reference in New Issue
Block a user