(svn r20207) -Codechange: Move variable declaration to first use.

This commit is contained in:
alberth
2010-07-23 18:40:39 +00:00
parent b4358056ee
commit 6490c06a66

View File

@@ -759,11 +759,9 @@ public:
virtual void OnClick(Point pt, int widget, int click_count)
{
Industry *i;
switch (widget) {
case IVW_INFO: {
i = Industry::Get(this->window_number);
Industry *i = Industry::Get(this->window_number);
/* We should work if needed.. */
if (!IsProductionAlterable(i)) return;
@@ -799,8 +797,8 @@ public:
}
} break;
case IVW_GOTO:
i = Industry::Get(this->window_number);
case IVW_GOTO: {
Industry *i = Industry::Get(this->window_number);
if (_ctrl_pressed) {
ShowExtraViewPortWindow(i->location.tile + TileDiffXY(1, 1));
} else {
@@ -809,6 +807,7 @@ public:
break;
}
}
}
virtual void OnTimeout()
{