summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-07-30 10:39:24 +0000
committeralberth <alberth@openttd.org>2010-07-30 10:39:24 +0000
commit2dd77d0ef941c7ba67c16b41b9da2eca66290669 (patch)
treebd3746c412f559c3e737e7ff44ce7522057c233c /src/industry_gui.cpp
parentf602e4310799db658473604d4f9e877f1218ce9e (diff)
downloadopenttd-2dd77d0ef941c7ba67c16b41b9da2eca66290669.tar.xz
(svn r20241) -Codechange: Move variable declarations to their first use.
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 13cb0b92f..fd3bd2b5e 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -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();