(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 07208fdc90
commit 3cd9351618
4 changed files with 44 additions and 75 deletions

View File

@@ -458,12 +458,11 @@ public:
{
switch (widget) {
case DPIW_MATRIX_WIDGET: {
const IndustrySpec *indsp;
int y = this->vscroll.GetScrolledRowFromWidget(pt.y, this, DPIW_MATRIX_WIDGET);
if (y < this->count) { // Is it within the boundaries of available data?
this->selected_index = y;
this->selected_type = this->index[y];
indsp = (this->selected_type == INVALID_INDUSTRYTYPE) ? NULL : GetIndustrySpec(this->selected_type);
const IndustrySpec *indsp = (this->selected_type == INVALID_INDUSTRYTYPE) ? NULL : GetIndustrySpec(this->selected_type);
this->SetDirty();