diff options
author | peter1138 <peter1138@openttd.org> | 2008-05-28 10:29:48 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-05-28 10:29:48 +0000 |
commit | bb002067363b6d331b04c7cea0cfb240a03c42c9 (patch) | |
tree | 98229bb37d8e318c46e4bbd27ecf90e9636ad14a /src/autoreplace_gui.cpp | |
parent | 504d0d1ae5aad221ab1e0e23f060f0ff5e6f103a (diff) | |
download | openttd-bb002067363b6d331b04c7cea0cfb240a03c42c9.tar.xz |
(svn r13306) -Fix (r8362): Pass engine list by pointer instead of making a copy of it.
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r-- | src/autoreplace_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 88d5a9db8..3f1caf10f 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -27,7 +27,7 @@ #include "table/sprites.h" #include "table/strings.h" -void DrawEngineList(VehicleType type, int x, int y, const EngineList eng_list, uint16 min, uint16 max, EngineID selected_id, int count_location, GroupID selected_group); +void DrawEngineList(VehicleType type, int x, int y, const EngineList *eng_list, uint16 min, uint16 max, EngineID selected_id, int count_location, GroupID selected_group); static const StringID _rail_types_list[] = { STR_RAIL_VEHICLES, @@ -386,7 +386,7 @@ public: EngineID end = min((i == 0 ? this->vscroll.cap : this->vscroll2.cap) + start, list.size()); /* Do the actual drawing */ - DrawEngineList((VehicleType)this->window_number, this->widget[widget].left + 2, this->widget[widget].top + 1, list, start, end, this->sel_engine[i], i == 0 ? this->widget[RVW_WIDGET_LEFT_MATRIX].right - 2 : 0, selected_group); + DrawEngineList((VehicleType)this->window_number, this->widget[widget].left + 2, this->widget[widget].top + 1, &list, start, end, this->sel_engine[i], i == 0 ? this->widget[RVW_WIDGET_LEFT_MATRIX].right - 2 : 0, selected_group); /* Also draw the details if an engine is selected */ if (this->sel_engine[i] != INVALID_ENGINE) { |