summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-26 20:51:17 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-27 18:30:56 +0200
commitb791ffc6de6dcc33739bb36bec4824dc44417961 (patch)
tree0f3c42eee61630369a59623b36e0920fcecb9235 /src/network
parenteaa3df1e8e3c9c6f6a22e95d0d4ed8ff251d4af9 (diff)
downloadopenttd-b791ffc6de6dcc33739bb36bec4824dc44417961.tar.xz
Fix: do not hide parameter by local variable with the same name
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_content.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp
index 2b90cf415..e09b05ec7 100644
--- a/src/network/network_content.cpp
+++ b/src/network/network_content.cpp
@@ -1010,9 +1010,9 @@ void ClientNetworkContentSocketHandler::CheckDependencyState(ContentInfo *ci)
/* First check whether anything depends on us */
int sel_count = 0;
bool force_selection = false;
- for (const ContentInfo *ci : parents) {
- if (ci->IsSelected()) sel_count++;
- if (ci->state == ContentInfo::SELECTED) force_selection = true;
+ for (const ContentInfo *parent_ci : parents) {
+ if (parent_ci->IsSelected()) sel_count++;
+ if (parent_ci->state == ContentInfo::SELECTED) force_selection = true;
}
if (sel_count == 0) {
/* Nothing depends on us */
@@ -1027,8 +1027,8 @@ void ClientNetworkContentSocketHandler::CheckDependencyState(ContentInfo *ci)
this->ReverseLookupTreeDependency(parents, c);
/* Is there anything that is "force" selected?, if so... we're done. */
- for (const ContentInfo *ci : parents) {
- if (ci->state != ContentInfo::SELECTED) continue;
+ for (const ContentInfo *parent_ci : parents) {
+ if (parent_ci->state != ContentInfo::SELECTED) continue;
force_selection = true;
break;