mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
(svn r20207) -Codechange: Move variable declaration to first use.
This commit is contained in:
parent
85c775e7f3
commit
f601259f46
@ -759,11 +759,9 @@ public:
|
|||||||
|
|
||||||
virtual void OnClick(Point pt, int widget, int click_count)
|
virtual void OnClick(Point pt, int widget, int click_count)
|
||||||
{
|
{
|
||||||
Industry *i;
|
|
||||||
|
|
||||||
switch (widget) {
|
switch (widget) {
|
||||||
case IVW_INFO: {
|
case IVW_INFO: {
|
||||||
i = Industry::Get(this->window_number);
|
Industry *i = Industry::Get(this->window_number);
|
||||||
|
|
||||||
/* We should work if needed.. */
|
/* We should work if needed.. */
|
||||||
if (!IsProductionAlterable(i)) return;
|
if (!IsProductionAlterable(i)) return;
|
||||||
@ -799,8 +797,8 @@ public:
|
|||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case IVW_GOTO:
|
case IVW_GOTO: {
|
||||||
i = Industry::Get(this->window_number);
|
Industry *i = Industry::Get(this->window_number);
|
||||||
if (_ctrl_pressed) {
|
if (_ctrl_pressed) {
|
||||||
ShowExtraViewPortWindow(i->location.tile + TileDiffXY(1, 1));
|
ShowExtraViewPortWindow(i->location.tile + TileDiffXY(1, 1));
|
||||||
} else {
|
} else {
|
||||||
@ -809,6 +807,7 @@ public:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
virtual void OnTimeout()
|
virtual void OnTimeout()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user