summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a2dc3e2)
unnecessary brackets removed in the if (currentTime > timeout && timeout != 0).
std::string TARIFF_IMPL::TariffChangeIsAllowed(const TARIFF & to, time_t currentTime) const
{
time_t timeout = GetChangePolicyTimeout();
std::string TARIFF_IMPL::TariffChangeIsAllowed(const TARIFF & to, time_t currentTime) const
{
time_t timeout = GetChangePolicyTimeout();
-if ((currentTime > timeout) && (timeout != 0))
+if (currentTime > timeout && timeout != 0)
return "";
switch (GetChangePolicy())
{
return "";
switch (GetChangePolicy())
{
case TARIFF::DENY:
return "Current tariff '" + GetName() + "', new tariff '" + to.GetName() + "'. The policy is '" + TARIFF::ChangePolicyToString(GetChangePolicy()) + "'.";
}
case TARIFF::DENY:
return "Current tariff '" + GetName() + "', new tariff '" + to.GetName() + "'. The policy is '" + TARIFF::ChangePolicyToString(GetChangePolicy()) + "'.";
}
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------