From: Elena Mamontova Date: Mon, 8 Aug 2016 11:28:03 +0000 (+0300) Subject: Ticket 37. The message variable definition moved from if() construction X-Git-Tag: 2.409~124 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/6be0c419e91a659c10478055156b70f40750bbfd Ticket 37. The message variable definition moved from if() construction in the ProcessNewMonth() function. --- diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index 7701bde3..8c38d909 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -1184,13 +1184,13 @@ if (nextTariff.ConstData() != "") } else { - if (tariff->TariffChangeIsAllowed(*nt) == "") + std::string message = tariff->TariffChangeIsAllowed(*nt); + if (message == "") { property.tariffName.Set(nextTariff, sysAdmin, login, store); } else { - std::string message = tariff->TariffChangeIsAllowed(*nt); WriteServLog("Tariff change is prohibited for user %s. %s", login.c_str(), message.c_str());