summaryrefslogtreecommitdiff
path: root/src/vehicle_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/vehicle_gui.cpp
parentf602e4310799db658473604d4f9e877f1218ce9e (diff)
downloadopenttd-2dd77d0ef941c7ba67c16b41b9da2eca66290669.tar.xz
(svn r20241) -Codechange: Move variable declarations to their first use.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 9a9d869fc..3e71c7b7c 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -1210,12 +1210,10 @@ public:
return;
case VLW_WIDGET_LIST: { // Matrix to show vehicles
- const Vehicle *v;
uint id_v = this->vscroll.GetScrolledRowFromWidget(pt.y, this, VLW_WIDGET_LIST);
if (id_v >= this->vehicles.Length()) return; // click out of list bound
- v = this->vehicles[id_v];
-
+ const Vehicle *v = this->vehicles[id_v];
ShowVehicleViewWindow(v);
} break;