diff options
author | rubidium <rubidium@openttd.org> | 2007-06-18 19:53:50 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-06-18 19:53:50 +0000 |
commit | 49220cc6f1e3570dc1b9001c40af2a8a4e35b649 (patch) | |
tree | 62843984493ffedb69f91d7b85cb631ecb61ff3e /src/order_cmd.cpp | |
parent | 3771d666c0e6bb48980b7548a2b38b3594efb3ff (diff) | |
download | openttd-49220cc6f1e3570dc1b9001c40af2a8a4e35b649.tar.xz |
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
Diffstat (limited to 'src/order_cmd.cpp')
-rw-r--r-- | src/order_cmd.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 986987da8..f33bfb4d2 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -441,7 +441,7 @@ CommandCost CmdInsertOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) RebuildVehicleLists(); } - return 0; + return CommandCost(); } /** Declone an order-list @@ -455,7 +455,7 @@ static CommandCost DecloneOrder(Vehicle *dst, uint32 flags) InvalidateVehicleOrder(dst); RebuildVehicleLists(); } - return 0; + return CommandCost(); } /** @@ -554,7 +554,7 @@ CommandCost CmdDeleteOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) RebuildVehicleLists(); } - return 0; + return CommandCost(); } /** Goto order of order-list. @@ -595,7 +595,7 @@ CommandCost CmdSkipToOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) if (v->type == VEH_AIRCRAFT) InvalidateWindowClasses(WC_AIRCRAFT_LIST); if (v->type == VEH_SHIP) InvalidateWindowClasses(WC_SHIPS_LIST); - return 0; + return CommandCost(); } /** @@ -681,7 +681,7 @@ CommandCost CmdMoveOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) RebuildVehicleLists(); } - return 0; + return CommandCost(); } /** Modify an order in the orderlist of a vehicle. @@ -763,7 +763,7 @@ CommandCost CmdModifyOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) } } - return 0; + return CommandCost(); } /** Clone/share/copy an order-list of an other vehicle. @@ -896,7 +896,7 @@ CommandCost CmdCloneOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) default: return CMD_ERROR; } - return 0; + return CommandCost(); } /** Add/remove refit orders from an order @@ -945,7 +945,7 @@ CommandCost CmdOrderRefit(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) } } - return 0; + return CommandCost(); } /** @@ -1058,7 +1058,7 @@ CommandCost CmdRestoreOrderIndex(TileIndex tile, uint32 flags, uint32 p1, uint32 v->service_interval = serv_int; } - return 0; + return CommandCost(); } |