]> git.stg.codes - stg.git/blobdiff - projects/stargazer/user_impl.cpp
Move variables declaration to the beginning of the function (old C)
[stg.git] / projects / stargazer / user_impl.cpp
index 6aca9cea06e69e4468f7f5303f844e52aa11882c..ca2e2cae221ae28f2ed807c4e5924381873b8da6 100644 (file)
@@ -484,7 +484,7 @@ for (int i = 0; i < DIR_NUM; i++)
     enabledDirs[i] = dirs & (1 << i);
     }
 
-if (authorizedBy.size())
+if (!authorizedBy.empty())
     {
     if (currIP != ip)
         {
@@ -1243,11 +1243,11 @@ switch (settings->GetFeeChargeType())
         property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge");
         break;
     case 1:
-        if (c > 0)
+        if (c >= 0)
             property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge");
         break;
     case 2:
-        if (c > fee)
+        if (c >= fee)
             property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge");
         break;
     }
@@ -1297,14 +1297,14 @@ switch (settings->GetFeeChargeType())
         SetPrepaidTraff();
         break;
     case 1:
-        if (c > 0)
+        if (c >= 0)
             {
             property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge");
             SetPrepaidTraff();
             }
         break;
     case 2:
-        if (c > fee)
+        if (c >= fee)
             {
             property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge");
             SetPrepaidTraff();