summaryrefslogtreecommitdiff
path: root/src/timetable_gui.cpp
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-02-14 17:04:01 +0000
committermichi_cc <michi_cc@openttd.org>2012-02-14 17:04:01 +0000
commit347157cb8ce016428275d6143b555de1dc802133 (patch)
tree5371016c56c8a5b927e359c0085bd83b1bd8e961 /src/timetable_gui.cpp
parent76344163c7d190894629768549130438c34174aa (diff)
downloadopenttd-347157cb8ce016428275d6143b555de1dc802133.tar.xz
(svn r23946) -Codechange: Pass a proper enum instead of a bit flag to CmdChangeTimetable for indicating what to change.
Diffstat (limited to 'src/timetable_gui.cpp')
-rw-r--r--src/timetable_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp
index 32a0dae11..287386d72 100644
--- a/src/timetable_gui.cpp
+++ b/src/timetable_gui.cpp
@@ -493,11 +493,11 @@ struct TimetableWindow : Window {
static inline uint32 PackTimetableArgs(const Vehicle *v, uint selected)
{
uint order_number = (selected + 1) / 2;
- uint is_journey = (selected % 2 == 1) ? 1 : 0;
+ ModifyTimetableFlags mtf = (selected % 2 == 1) ? MTF_TRAVEL_TIME : MTF_WAIT_TIME;
if (order_number >= v->GetNumOrders()) order_number = 0;
- return v->index | (order_number << 20) | (is_journey << 28);
+ return v->index | (order_number << 20) | (mtf << 28);
}
virtual void OnClick(Point pt, int widget, int click_count)