]> git.stg.codes - stg.git/blobdiff - projects/stargazer/user_impl.cpp
Ticket 37. c_str() function removed for the
[stg.git] / projects / stargazer / user_impl.cpp
index 7701bde3fa3b8bf09b463223c2f7ac306ca259ef..f8335525a00acb3020df41ab84649a8e5e4b9ff7 100644 (file)
@@ -1184,13 +1184,13 @@ if (nextTariff.ConstData() != "")
         }
     else
         {
-        if (tariff->TariffChangeIsAllowed(*nt) == "")
+        std::string message = tariff->TariffChangeIsAllowed(*nt);
+        if (message.empty())
             {
             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());