summaryrefslogtreecommitdiff
path: root/src/smallmap_gui.cpp
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/smallmap_gui.cpp
parenteaa3df1e8e3c9c6f6a22e95d0d4ed8ff251d4af9 (diff)
downloadopenttd-b791ffc6de6dcc33739bb36bec4824dc44417961.tar.xz
Fix: do not hide parameter by local variable with the same name
Diffstat (limited to 'src/smallmap_gui.cpp')
-rw-r--r--src/smallmap_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index 17d1d25cb..bc0a7b447 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -1436,8 +1436,8 @@ int SmallMapWindow::GetPositionOnLegend(Point pt)
case WID_SM_ZOOM_IN:
case WID_SM_ZOOM_OUT: {
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SM_MAP);
- Point pt = { (int)wid->current_x / 2, (int)wid->current_y / 2};
- this->SetZoomLevel((widget == WID_SM_ZOOM_IN) ? ZLC_ZOOM_IN : ZLC_ZOOM_OUT, &pt);
+ Point zoom_pt = { (int)wid->current_x / 2, (int)wid->current_y / 2};
+ this->SetZoomLevel((widget == WID_SM_ZOOM_IN) ? ZLC_ZOOM_IN : ZLC_ZOOM_OUT, &zoom_pt);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
break;
}