diff options
author | rubidium <rubidium@openttd.org> | 2008-04-05 23:36:54 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-05 23:36:54 +0000 |
commit | 5b47f81b0f6d46a876a24c0384791af123ac4ab7 (patch) | |
tree | 0ddf9ce628e1f7f3677425777bfeb4f04b23d7a0 /src/timetable_gui.cpp | |
parent | 56e63a60447beeae0cc541191ea77f06e237b40a (diff) | |
download | openttd-5b47f81b0f6d46a876a24c0384791af123ac4ab7.tar.xz |
(svn r12584) -Codechange: do not access the order type directly.
Diffstat (limited to 'src/timetable_gui.cpp')
-rw-r--r-- | src/timetable_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 887929b69..192031b52 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -79,7 +79,7 @@ static void DrawTimetableWindow(Window *w) w->EnableWidget(TTV_CLEAR_TIME); } else { const Order *order = GetVehicleOrder(v, (selected + 1) / 2); - bool disable = order == NULL || order->type != OT_GOTO_STATION || (_patches.new_nonstop && (order->flags & OFB_NON_STOP)); + bool disable = order == NULL || !order->IsType(OT_GOTO_STATION) || (_patches.new_nonstop && (order->flags & OFB_NON_STOP)); w->SetWidgetDisabledState(TTV_CHANGE_TIME, disable); w->SetWidgetDisabledState(TTV_CLEAR_TIME, disable); @@ -113,7 +113,7 @@ static void DrawTimetableWindow(Window *w) if (i % 2 == 0) { SetDParam(2, STR_EMPTY); - switch (order->type) { + switch (order->GetType()) { case OT_DUMMY: SetDParam(0, STR_INVALID_ORDER); break; @@ -197,7 +197,7 @@ static void DrawTimetableWindow(Window *w) for (const Order *order = GetVehicleOrder(v, 0); order != NULL; order = order->next) { total_time += order->travel_time + order->wait_time; if (order->travel_time == 0) complete = false; - if (order->wait_time == 0 && order->type == OT_GOTO_STATION && !(_patches.new_nonstop && (order->flags & OFB_NON_STOP))) complete = false; + if (order->wait_time == 0 && order->IsType(OT_GOTO_STATION) && !(_patches.new_nonstop && (order->flags & OFB_NON_STOP))) complete = false; } if (total_time != 0) { |