summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2013-01-20 16:17:24 +0000
committerplanetmaker <planetmaker@openttd.org>2013-01-20 16:17:24 +0000
commitf8fd13dea17388f7d65fdb52656c5d307608f171 (patch)
tree609e422c91ebe603720955074c612ab864f3c5a4 /src
parentf73e43818c567f1c9413181f0950701551c03920 (diff)
downloadopenttd-f8fd13dea17388f7d65fdb52656c5d307608f171.tar.xz
(svn r24927) -Cleanup [FS#5440]: No need to check a positive value to be larger than 0
Diffstat (limited to 'src')
-rw-r--r--src/economy.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index d9229351d..ea59be708 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -560,16 +560,16 @@ static void CompanyCheckBankrupt(Company *c)
/* Offer company for sale after 6 months */
case 7: {
- /* Check if the company has any value. If not, declare it bankrupt
- * right now */
+ /* Don't consider the loan */
Money val = CalculateCompanyValue(c, false);
- if (val > 0) {
- c->bankrupt_value = val;
- c->bankrupt_asked = 1 << c->index; // Don't ask the owner
- c->bankrupt_timeout = 0;
- break;
- }
- /* FALL THROUGH to case 10 */
+
+ c->bankrupt_value = val;
+ c->bankrupt_asked = 1 << c->index; // Don't ask the owner
+ c->bankrupt_timeout = 0;
+
+ /* The company assets should always have some value */
+ assert(c->bankrupt_value > 0);
+ break;
}
/* Bankrupt company after 6 months (if the company has no value) or latest