X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/73f662acc31034cd98fdc6e157454f7763ef0792..1347f3d1e04bedd1508589173f577673ee2c5554:/projects/stargazer/tariff_impl.cpp diff --git a/projects/stargazer/tariff_impl.cpp b/projects/stargazer/tariff_impl.cpp index bf272f31..c6785cea 100644 --- a/projects/stargazer/tariff_impl.cpp +++ b/projects/stargazer/tariff_impl.cpp @@ -119,7 +119,7 @@ else } } //----------------------------------------------------------------------------- -double TARIFF_IMPL::GetPriceWithoutFreeMb(int dir, int mb, time_t t) const +double TARIFF_IMPL::GetPriceWithoutFreeMb(int dir, int64_t mb, time_t t) const { int interval = Interval(dir, t); @@ -143,45 +143,5 @@ else if (!sp && th) return tariffData.dirPrice[dir].priceNightA; else return tariffData.dirPrice[dir].priceDayA; - -/*if (tariffData.dirPrice[dir].noDiscount && tariffData.dirPrice[dir].singlePrice) - { - return tariffData.dirPrice[dir].priceDayA; - } -else - { - if (tariffData.dirPrice[dir].noDiscount) - { - // Without threshold - if (interval == TARIFF_DAY) - return tariffData.dirPrice[dir].priceDayA; - else - return tariffData.dirPrice[dir].priceNightA; - } - - if (tariffData.dirPrice[dir].singlePrice) - { - // Without day/night - if (mb < tariffData.dirPrice[dir].threshold) - return tariffData.dirPrice[dir].priceDayA; - else - return tariffData.dirPrice[dir].priceDayB; - } - - if (mb < tariffData.dirPrice[dir].threshold) - { - if (interval == TARIFF_DAY) - return tariffData.dirPrice[dir].priceDayA; - else - return tariffData.dirPrice[dir].priceNightA; - } - else - { - if (interval == TARIFF_DAY) - return tariffData.dirPrice[dir].priceDayB; - else - return tariffData.dirPrice[dir].priceNightB; - } - }*/ } //-----------------------------------------------------------------------------