1
0
Fork 0

(svn r24927) -Cleanup [FS#5440]: No need to check a positive value to be larger than 0

release/1.3
planetmaker 2013-01-20 16:17:24 +00:00
parent f73e43818c
commit f8fd13dea1
1 changed files with 9 additions and 9 deletions

View File

@ -560,17 +560,17 @@ static void CompanyCheckBankrupt(Company *c)
/* Offer company for sale after 6 months */ /* Offer company for sale after 6 months */
case 7: { case 7: {
/* Check if the company has any value. If not, declare it bankrupt /* Don't consider the loan */
* right now */
Money val = CalculateCompanyValue(c, false); Money val = CalculateCompanyValue(c, false);
if (val > 0) {
c->bankrupt_value = val; c->bankrupt_value = val;
c->bankrupt_asked = 1 << c->index; // Don't ask the owner c->bankrupt_asked = 1 << c->index; // Don't ask the owner
c->bankrupt_timeout = 0; c->bankrupt_timeout = 0;
/* The company assets should always have some value */
assert(c->bankrupt_value > 0);
break; break;
} }
/* FALL THROUGH to case 10 */
}
/* Bankrupt company after 6 months (if the company has no value) or latest /* Bankrupt company after 6 months (if the company has no value) or latest
* after 9 months (if it still had value after 6 months) */ * after 9 months (if it still had value after 6 months) */