mirror of https://github.com/OpenTTD/OpenTTD
(svn r20412) -Codechange: Replace an if by a switch in IndustryCargoesWindow::OnClick.
parent
3da3d131c6
commit
e1e8e245a0
|
@ -2346,8 +2346,8 @@ struct IndustryCargoesWindow : public Window {
|
||||||
|
|
||||||
virtual void OnClick(Point pt, int widget, int click_count)
|
virtual void OnClick(Point pt, int widget, int click_count)
|
||||||
{
|
{
|
||||||
if (widget != ICW_PANEL) return;
|
switch (widget) {
|
||||||
|
case ICW_PANEL: {
|
||||||
Point fieldxy, xy;
|
Point fieldxy, xy;
|
||||||
if (!CalculatePositionInWidget(pt, &fieldxy, &xy)) return;
|
if (!CalculatePositionInWidget(pt, &fieldxy, &xy)) return;
|
||||||
|
|
||||||
|
@ -2374,6 +2374,9 @@ struct IndustryCargoesWindow : public Window {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnHover(Point pt, int widget)
|
virtual void OnHover(Point pt, int widget)
|
||||||
|
|
Loading…
Reference in New Issue