Fix: do not hide parameter by local variable with the same name

This commit is contained in:
rubidium42
2021-05-26 20:51:17 +02:00
committed by rubidium42
parent eaa3df1e8e
commit b791ffc6de
14 changed files with 130 additions and 130 deletions

View File

@@ -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;
}