summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2015-05-11 16:53:05 +0000
committerfrosch <frosch@openttd.org>2015-05-11 16:53:05 +0000
commite686add63a0d663c027672d5ab696a2e940b195e (patch)
treeac10ed665096c4457aefdc543a5adf39046627fb /src
parent18da27ed6e4429ed82ce62fa24ea848b93eb9ec3 (diff)
downloadopenttd-e686add63a0d663c027672d5ab696a2e940b195e.tar.xz
(svn r27281) -Codechange: Do not shadow local variables with other local variables in sub-scopes.
Diffstat (limited to 'src')
-rw-r--r--src/economy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 37a89b3f2..09eec0386 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -300,7 +300,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
/* Single player cheated to AI company.
* There are no spectators in single player, so we must pick some other company. */
assert(!_networking);
- Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
+ Backup<CompanyByte> cur_company2(_current_company, FILE_LINE);
Company *c;
FOR_ALL_COMPANIES(c) {
if (c->index != old_owner) {
@@ -308,7 +308,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
break;
}
}
- cur_company.Restore();
+ cur_company2.Restore();
assert(old_owner != _local_company);
}