(svn r20241) -Codechange: Move variable declarations to their first use.

This commit is contained in:
alberth
2010-07-30 10:39:24 +00:00
parent f602e43107
commit 2dd77d0ef9
4 changed files with 44 additions and 75 deletions

View File

@@ -1326,12 +1326,11 @@ public:
break;
case BRSW_NEWST_LIST: {
const StationSpec *statspec;
int y = this->vscroll.GetScrolledRowFromWidget(pt.y, this, BRSW_NEWST_LIST, 0, this->line_height);
if (y >= _railstation.station_count) return;
/* Check station availability callback */
statspec = GetCustomStationSpec(_railstation.station_class, y);
const StationSpec *statspec = GetCustomStationSpec(_railstation.station_class, y);
if (statspec != NULL && HasBit(statspec->callback_mask, CBM_STATION_AVAIL) &&
GB(GetStationCallback(CBID_STATION_AVAILABILITY, 0, 0, statspec, NULL, INVALID_TILE), 0, 8) == 0) return;