From: Elena Mamontova Date: Wed, 14 Sep 2016 14:44:19 +0000 (+0300) Subject: Ticket 37. In 'case' where TARIFF::TO_EXPENSIVE, operation '>' changed to '>=' in X-Git-Tag: 2.409~93 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/fb965f74c4ed2331d9605942da3673d1ba7a1dfe?ds=sidebyside Ticket 37. In 'case' where TARIFF::TO_EXPENSIVE, operation '>' changed to '>=' in if() construction in TariffChangeIsAllowed() function. --- diff --git a/projects/stargazer/tariff_impl.cpp b/projects/stargazer/tariff_impl.cpp index 34590975..a3084fbc 100644 --- a/projects/stargazer/tariff_impl.cpp +++ b/projects/stargazer/tariff_impl.cpp @@ -157,7 +157,7 @@ switch (GetChangePolicy()) else return "New tariff '" + to.GetName() + "' is more expensive than current tariff '" + GetName() + "'. The policy is '" + TARIFF::ChangePolicyToString(GetChangePolicy()) + "'."; case TARIFF::TO_EXPENSIVE: - if (to.GetFee() > GetFee()) + if (to.GetFee() >= GetFee()) return ""; else return "New tariff '" + to.GetName() + "' is more cheap than current tariff '" + GetName() + "'. The policy is '" + TARIFF::ChangePolicyToString(GetChangePolicy()) + "'.";