summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-06-05 12:16:12 +0000
committerfrosch <frosch@openttd.org>2010-06-05 12:16:12 +0000
commit1d3adb2b66989630b2a3c201ac1210a886d41a51 (patch)
treec7c2c22646cfdeb1312455bfd9d59674b7ff96be /src/economy.cpp
parent406c2a986571ce594f491c0fde225b89f14ac8c3 (diff)
downloadopenttd-1d3adb2b66989630b2a3c201ac1210a886d41a51.tar.xz
(svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 21e9516c3..308334b1c 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -305,7 +305,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
#endif /* ENABLE_NETWORK */
Town *t;
- Backup<CompanyByte> cur_company(_current_company, old_owner);
+ Backup<CompanyByte> cur_company(_current_company, old_owner, FILE_LINE);
assert(old_owner != new_owner);
@@ -327,7 +327,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
}
/* Sell all the shares that people have on this company */
- Backup<CompanyByte> cur_company2(_current_company);
+ Backup<CompanyByte> cur_company2(_current_company, FILE_LINE);
c = Company::Get(old_owner);
for (i = 0; i < 4; i++) {
cur_company2.Change(c->share_owners[i]);
@@ -553,7 +553,7 @@ static void CompaniesGenStatistics()
Station *st;
Company *c;
- Backup<CompanyByte> cur_company(_current_company);
+ Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
FOR_ALL_STATIONS(st) {
cur_company.Change(st->owner);
CommandCost cost(EXPENSES_PROPERTY, _price[PR_STATION_VALUE] >> 1);
@@ -688,7 +688,7 @@ static void CompaniesPayInterest()
{
const Company *c;
- Backup<CompanyByte> cur_company(_current_company);
+ Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
FOR_ALL_COMPANIES(c) {
cur_company.Change(c->index);
@@ -1027,7 +1027,7 @@ CargoPayment::~CargoPayment()
if (this->visual_profit == 0) return;
- Backup<CompanyByte> cur_company(_current_company, this->front->owner);
+ Backup<CompanyByte> cur_company(_current_company, this->front->owner, FILE_LINE);
SubtractMoneyFromCompany(CommandCost(this->front->GetExpenseType(true), -this->route_profit));
this->front->profit_this_year += this->visual_profit << 8;
@@ -1458,7 +1458,7 @@ static void DoAcquireCompany(Company *c)
}
value = CalculateCompanyValue(c) >> 2;
- Backup<CompanyByte> cur_company(_current_company);
+ Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
for (i = 0; i != 4; i++) {
if (c->share_owners[i] != COMPANY_SPECTATOR) {
cur_company.Change(c->share_owners[i]);